Parameter determination assisting device and parameter determination assisting program

ABSTRACT

This invention provides a parameter determination assisting device and a parameter determination assisting program enabling a more rapid and easy determination of a parameter to be set in a processing device, which obtains a processing result by performing a process using a set of parameters defined in advance on image data obtained by imaging a measuring target object. A user can easily select an optimum parameter set when a determination result and a statistical output are displayed in a list for each of a plurality of trial parameter candidates. For instance, while trial numbers “2”, “4”, and “5”, in which the number of false detections is zero, can perform a stable process, the parameter set of the trial number “2” is comprehensively assumed as optimum since the trial number “2” can perform the process in the shortest processing time length.

This nonprovisional application claims priority under 35 U.S.C. §119(a)on Patent Applications No. 2009-011251 filed in Japan on Jan. 21, 2009,and No. 2009-227389 filed in Japan on Sep. 30, 2009, the entire contentsof which are hereby incorporated by reference.

BACKGROUND OF THE INVENTION

1. Technical Field

The present invention relates to an image processing device forobtaining a processing result through a process using a set ofparameters defined in advance on image data obtained by imaging ameasuring target object.

2. Related Art

In the field of FA (Factory Automation) and the like, signal processingand the like are performed on various types of data acquired with use ofvarious types of sensors from a measuring target object such as ahalf-completed product in the manufacturing process or a product beforeshipment, and tests, measurements, discrimination and the like on themeasuring target object are often carried out based on the signalprocessed data. Typically, there is widely used an image processingdevice for acquiring image data by imaging the measuring target objectwith an imaging device or the like, and optically testing defects in themeasuring target object, optically measuring the size of a specificportion of the measuring target object, and detecting a character stringappearing in the measuring target object based on the acquired imagedata (see e.g., Japanese Unexamined Patent Publication No. 08-101139).

Japanese Unexamined Patent Publication No. 2002-008013, for example,discloses an outer appearance test program used in an outer appearancetesting device for determining defects of the outer appearance of anarticle using image data. More specifically, Japanese Unexamined PatentPublication No. 2002-008013 has an object to perform an accurate andhighly reliable test of an outer appearance.

Japanese Unexamined Patent Publication No. 2006-085616 discloses animage processing algorithm evaluation method using an evaluation valuereflecting a separation capacity between an extraction target site and anon-extraction target side in an image. More specifically, disclosed isa technique of performing a performance evaluation of the imageprocessing algorithm for extracting only an extraction target portion byquantifying the degree of separation on a characteristic amount betweenthe extraction target portion and the non-extraction target portion.

When installing such an image processing device on a production line orthe like, optimization of a set of parameters related to imageprocessing, test processing, measurement processing, discriminationprocessing, and the like is a very troublesome task. In other words, inthe image processing device described above, the result on the measuringtarget object appearing in the image data is judged in a comprehensivemanner after performing a similar process on one piece of input imagedata a plurality of times. Furthermore, the number of parameters relatedto image processing in the image processing device is relatively large,and the result of image processing sometimes greatly fluctuates only byone parameter being changed. Moreover, the parameters need to beoptimized so that a stable result not to cause false determination isobtained by actually performing tests, measurements, discriminations,and the like on the measuring target object.

An actual setting procedure for a set of parameters includes actuallyperforming tests, measurements, discriminations and the like on themeasuring target object after setting the set of parameters to a certainset of values, and judging whether or not the set of parameters havingbeen set is appropriate. If judged as inappropriate, the set ofparameters is changed to a different set of values, and then tests,measurements, discriminations and the like on the measuring targetobject are again performed. The setting of the set of parameters, andthe evaluation of the processing result based on the actually acquiredimage data are iteratively repeated until an optimum set of parametersis obtained.

Since such iterative procedures need to be performed, the parametersetting requires a great amount of manpower and many days. Not limitedto image data as described above, the parameter setting on various othertypes of data is also troublesome. The optimum set of parameters isdifficult to rapidly obtain by a non-skilled person with sufficientexperience.

In the methods described in Japanese Unexamined Patent Publication No.2002-008013 and Japanese Unexamined Patent Publication No. 2006-085616,there is disclosed the technique of automatically determining a setvalue related to image processing including necessary parametersaccording to an evaluation logic defined in advance, but the predefinedevaluation logic itself may not necessarily be optimum for all measuringtarget objects. In other words, since the techniques disclosed inJapanese Unexamined Patent Publication No. 2002-008013 and JapaneseUnexamined Patent Publication No. 2006-085616 automatically determinenumerous parameters according to an evaluation criteria defined inadvance, such techniques may be applied to an image processing deviceused in a specific purpose, but cannot be applied to a universal(multi-functional) image processing device.

SUMMARY

The present invention has been devised to solve the problems describedabove, and an object thereof is to provide a parameter determinationassisting device and a parameter determination assisting programenabling a more rapid and easy determination of a set of parameters tobe set in an image processing device, which obtains a processing resultthrough a process using a set of parameters defined in advance on imagedata obtained by imaging a measuring target object.

In accordance with an aspect of the present invention, there is provideda parameter determination assisting device for an image processingdevice which obtains a processing result by performing a process using aset of parameters defined in advance on image data obtained by imaging ameasuring target object. The parameter determination assisting deviceincludes: an input unit for accepting the image data and an expectedresult corresponding to the image data; a candidate generation unit forgenerating a plurality of parameter candidates in which at least oneparameter value contained in the set of parameters is differed from eachother; an acquiring unit for acquiring a plurality of processing resultsrespectively using the plurality of parameter candidates on the imagedata; an evaluation unit for generating an evaluation result for each ofthe plurality of processing results by comparing each of the pluralityof processing results with the corresponding expected result; and anoutput unit for outputting the evaluation result for each of theplurality of parameter candidates.

Preferably, the evaluation unit includes: a portion for accepting acondition to be satisfied by the evaluation result; and a portion fordetermining a processing result most adapted to the condition out of theplurality of processing results respectively using the plurality ofparameter candidates, and the output unit outputs the determinedprocessing result.

The candidate generation unit preferably includes: a portion foraccepting a specification of at least one of a fluctuation step and afluctuation range of the parameter value; and a portion for generatingthe plurality of parameter candidates according to the specifiedfluctuation step and/or the fluctuation range of the parameter value.

More preferably, the candidate generation unit accepts a specificationonly on a specific parameter defined in advance out of the parametervalues contained in the set of parameters.

Alternatively, more preferably, the image processing device provides auser interface for accepting a setting of the set of parameters on theprocess performed on the image data, the parameters contained in the setof parameters being displayed in a visually sectionalized manner on theuser interface, and the candidate generation unit displays each of theparameters contained in the set of parameters so as to correspond to avisual section displaying the parameter in the user interface.

Preferably, the input unit accepts the plurality of image datarespectively acquired from a plurality of measuring target objects andthe expected results respectively corresponding to the plurality ofimage data, and the acquiring unit acquires a processing result groupincluding the evaluation results on the plurality of image data for theplurality of parameter candidates, respectively.

More preferably, the expected results each include an expected classindicating whether the corresponding measuring target object is anon-defective article or a defective article; the acquiring unit outputsa value indicating either the non-defective article or the defectivearticle as the processing result, the evaluation unit includes a portionfor calculating a degree of coincidence with the corresponding expectedclass out of the plurality of processing results contained in each ofthe processing result group, and the output unit outputs the degree ofcoincidence.

The degree of coincidence is further preferably the number of processingresults that do not match the corresponding expected class out of theplurality of processing results contained in each of the processingresult group.

When the number of processing results that do not match thecorresponding expected class exceeds a tolerable upper limit defined inadvance during generation of the processing result group for one of theparameter candidates, the evaluation unit more preferably cancelsgeneration of the processing result on the remaining image data for theparameter candidate.

Alternatively, the evaluation unit more preferably calculates astatistic value on the processing result contained in the correspondingprocessing result group for each of the plurality of parametercandidates.

Further alternatively, the output unit more preferably outputs theprocessing result contained in the processing result group for each ofthe corresponding image data.

Alternatively more preferably, the acquiring unit includes a portion formeasuring a processing time length required to generate the processingresult; and the output unit outputs the measured processing time lengthtogether with the evaluation result.

When the processing time length exceeding a permissible time lengthprovided in advance is measured during the process on the plurality ofimage data for one of the parameter candidates, the acquiring unit morepreferably cancels acquisition of the processing result on the remainingimage data for the parameter candidate.

Alternatively, more preferably, the acquiring unit includes: a portionfor calculating a characteristic amount on the image data by performingthe process on the image data; and a portion for generating theprocessing result by comparing the characteristic amount with athreshold value provided in advance, and the output unit outputs adistribution state of the characteristic amounts corresponding to theprocessing results contained in the processing result group.

More preferably, the processing result contains information indicating aportion that matches an image pattern defined in advance in the imagedata, and the output unit displays a position extracted as the portionthat matches the image pattern on a two-dimensional coordinatecorresponding to the image data.

Alternatively, the acquiring unit more preferably repeats the process ofacquiring the processing result on each of the plurality of image datafor each of the plurality of parameter candidates by the number of theplurality of parameter candidates.

Alternatively, the acquiring unit more preferably repeats the process ofacquiring the processing result on each of the plurality of parametercandidates for each of the plurality of image data by the number of theplurality of image data.

Preferably, the candidate generation unit includes a portion forgenerating a first parameter candidate group including a plurality ofparameter candidates, and a second parameter candidate group having afluctuation step smaller than a fluctuation step between the parametercandidates contained in the first parameter candidate group, and theacquiring unit determines a parameter value to be a fluctuation targetout of the acquired processing results after acquiring the processingresult on the parameter candidate contained in the first parametercandidate group, and acquires the processing result on the parametercandidate contained in the second parameter candidate groupcorresponding to the determined parameter value.

Preferably, the input unit accepts image data of a first group obtainedby imaging a first measuring target object and an expected result of afirst group corresponding to the image data of the first group, andimage data of a second group obtained by imaging a second measuringtarget object and an expected result of a second group corresponding tothe image data of the second group, the candidate generation unitgenerates a plurality of parameter candidates of a first group in whichat least one parameter value contained in a set of first parametersrelated to a process performed on the image data of the first group isdiffered from each other, and generates a plurality of parametercandidates of a second group in which at least one parameter valuecontained in a set of second parameters related to a process performedon the image data of the second group is differed from each other, theacquiring unit and the evaluation unit acquire a plurality of processingresults of a first group using each of the plurality of parametercandidates of the first group on the image data of the first group andgenerates a first evaluation result on the plurality of processingresults of the first group by comparing each of the plurality ofprocessing results of the first group with the corresponding expectedresult out of the expected results of the first group, and then acquirea plurality of processing results of a second group using the pluralityof parameter candidates of the second group on the image data of thesecond group and generates a second evaluation result on the pluralityof processing results of the second group by comparing each of theplurality of processing results of the second group with thecorresponding expected result out of the expected results of the secondgroup, and the output unit outputs at least one of the first evaluationresult and the second evaluation result after the processes by theacquiring unit and the evaluation unit are completed.

In accordance with another aspect of the present invention, there isprovided a program determination assisting program for an imageprocessing device which obtains a processing result by performing aprocess using a set of parameters defined in advance on image dataobtained by imaging a measuring target object. The parameterdetermination assisting program causes a computer to function as: aninput unit for accepting the image data and an expected resultcorresponding to the image data; a candidate generation unit forgenerating a plurality of parameter candidates in which at least oneparameter value contained in the set of parameters is differed from eachother; an acquiring unit for acquiring a plurality of processing resultsrespectively using the plurality of parameter candidates on the imagedata; an evaluation unit for generating an evaluation result for each ofthe plurality of generated processing results by comparing each of theplurality of generated processing results with the expected result; andan output unit for outputting the evaluation result for each of theplurality of parameter candidates.

With the parameter determination assisting device according to oneaspect of the present invention, it is possible to determine morerapidly and easily a set of parameters to be set in the image processingdevice, which obtains a processing result by performing a process usinga set of parameters defined in advance on image data obtained by imaginga measuring target object.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram showing an entire system according to an embodimentof the present invention;

FIG. 2 is a diagram showing one example of a work flow upon operating avisual sensor on a production line;

FIGS. 3A to 3C are conceptual views showing a procedure for determiningparameters according to the embodiment of the present invention;

FIG. 4 is a schematic configuration diagram of a computer forimplementing a parameter determination assisting device according to theembodiment of the present invention;

FIG. 5 is a schematic configuration diagram of a computer forimplementing an image processing device according to the embodiment ofthe present invention;

FIGS. 6A and 6B are diagrams showing a screen display example (1)displayed on a monitor of the image processing device according to theembodiment of the present invention;

FIGS. 7A and 7B are diagrams showing a screen display example (2)displayed on the monitor of the image processing device according to theembodiment of the present invention;

FIGS. 8A and 8B are views showing one example of image data handled inthe image processing device according to the embodiment of the presentinvention;

FIG. 9 is a view for describing an outline of a process in the parameterdetermination assisting device according to the embodiment of thepresent invention;

FIG. 10 is a view showing one example of a user interface in theparameter determination assisting device according to the embodiment ofthe present invention;

FIG. 11 is a view showing one example of a user interface in theparameter determination assisting device according to the embodiment ofthe present invention;

FIG. 12 is a view showing one example of a user interface in theparameter determination assisting device according to the embodiment ofthe present invention;

FIG. 13 is a view showing another example of a user interface in theparameter determination assisting device according to the embodiment ofthe present invention;

FIG. 14 is a view showing main parts of a user interface correspondingsetting screen shown in FIG. 13;

FIGS. 15A to 15C are views for describing change in a display mode ofthe user interface shown in FIG. 13;

FIG. 16 is a view showing one example of a user interface in theparameter determination assisting device according to the embodiment ofthe present invention;

FIGS. 17A and 17B are views showing one example of a user interface inthe parameter determination assisting device according to the embodimentof the present invention;

FIGS. 18A and 18B are views showing one example of a user interface inthe parameter determination assisting device according to the embodimentof the present invention;

FIGS. 19A and 19B are views showing one example of a user interface inthe parameter determination assisting device according to the embodimentof the present invention;

FIGS. 20A and 20B are views showing one example of a user interface inthe parameter determination assisting device according to the embodimentof the present invention;

FIGS. 21A and 21B are views showing one example of a user interface inthe parameter determination assisting device according to the embodimentof the present invention;

FIGS. 22A and 22B are views showing one example of a user interface inthe parameter determination assisting device according to the embodimentof the present invention;

FIGS. 23A and 23B are views showing one example of a user interface inthe parameter determination assisting device according to the embodimentof the present invention;

FIG. 24 is a functional block diagram showing a control structure of theparameter determination assisting device according to the embodiment ofthe present invention;

FIGS. 25A to 25D are diagrams showing a structure of a file generated inthe parameter determination assisting device shown in FIG. 24;

FIG. 26 is a view showing one example of an interface for conditioninput in the parameter determination assisting device according to theembodiment of the present invention;

FIG. 27 is a flowchart (I) showing an overall process in the parameterdetermination assisting device according to the embodiment of thepresent invention;

FIG. 28 is a flowchart (II) showing an overall process in the parameterdetermination assisting device according to the embodiment of thepresent invention;

FIG. 29 is a flowchart showing an overall process in the parameterdetermination assisting device according to a first variant of theembodiment of the present invention;

FIG. 30 is a flowchart showing an overall process in the parameterdetermination assisting device according to a second variant of theembodiment of the present invention;

FIG. 31 is a diagram for describing an outline of the continuousexecution process in the parameter determination assisting deviceaccording to the embodiment of the present invention;

FIG. 32 is a diagram showing one example of a user interface at the timeof the continuous execution process in the parameter determinationassisting device according to the embodiment of the present invention;and

FIG. 33 is a flowchart at the time of the continuous execution processin the parameter determination assisting device according to theembodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Hereinafter, preferred embodiments of the present invention will bedescribed with reference to the drawings. The same reference numeralswill be given for the same or corresponding portions in the figures, andthe description thereof will not be repeated.

<A. Outline>

In the embodiment of the present invention, an image processing devicefor obtaining a processing result by performing a process using a set ofparameters defined in advance on target data, which is acquired from themeasuring target object and which reflects the physical quantity of themeasuring target object, is illustrated. As a typical example of such aprocessing device, an image processing device for FA for performingimage processing on the image data obtained by imaging the measuringtarget object is illustrated.

In other words, the image processing device described in the presentembodiment is a so-called visual sensor, and typically accepts the imagedata obtained by imaging the measuring target object (hereinafter alsoreferred to as “work”) flowing through the production line and the like,and optically executes various types of processes such as a defect test,size measurement, character string discrimination, and pattern matchingon the work based on the image data. In the image processing deviceaccording to the present embodiment, the image data optically acquiredfrom the work and reflecting the physical state of the surface of thework is used. In such a image processing device, the “process using aset of parameters defined in advance” in the present invention includesall or some of a series of processes such as pre-processing on the inputimage data, measurement processing of a characteristic amount in theimage data of after the pre-processing, and determination processing onthe measured characteristic amount.

In addition to a case of using the image data obtained by imaging thework as target data, a physical quantity of the measuring target object(work) may be acquired, and the acquired physical quantity itself or thetemporal change of the physical quantity, a one-dimensional array ormulti-dimensional array corresponding to the physical quantity, as wellas the temporal change in such an array and the like may be used as thetarget of the parameter determination assisting device according to thepresent invention. More specifically, data in which a physical size ofthe work and the like are acquired by a displacement sensor, dataindicating the temporal change of an ON/OFF signal detected by eachelement of a sensor group in which a plurality of light projectingelements and light receiving elements are linearly arranged, dataindicating the distribution of a temperature signal detected by aplurality of temperature sensors arranged in an array form, and thelike, may be applied to the processing device for performing test,measurement, and discrimination on the work, and the like after beingprocessed using a statistical method and the like.

The parameter determination assisting device according to the embodimentof the present invention accepts the image data input to the imageprocessing device, and an expected result corresponding to the imagedata. The determination on the optimum set of parameters related toimage processing in the image processing device is assisted by theprocessing to be hereinafter described.

Here, the “expected result” refers to the content of the processingresult to be generated when the corresponding image data is input to theimage processing device (correspond to image processing device accordingto the present invention). The “expected result” typically includes“expected value” and “expected class”.

Here, the “expected value” includes an original coordinate to bedetected, that is, position information of a characteristic point of (orassumed to be of) the work appearing in the corresponding image data inpattern matching and the like. In another example, the “expected value”includes a width of the work to be detected, that is, a size of thewidth at a specific position of (or assumed to be of) the work appearingin the corresponding image data in measuring the size and the like. Inanother further example, the “expected value” includes an originalcharacter string to be discriminated, that is, values of the charactersconfiguring the character string printed etc. on the work appearing inthe corresponding image data in discriminating the character stringappearing on the work. In another further example, the “expected value”includes an original character string to be discriminated, that is,values of the characters configuring the character string printed etc.on the work appearing in the corresponding image data in discriminatingthe character string appearing on the work. In another further example,the “expected value” includes actual number of pins of the work intesting the number of pins of an IC (Integrated Circuit).

The “expected class” includes presence of defect to be detected, thatis, attribute indicating whether the work appearing in the correspondingimage data is “non-defective article” or “defective article” in testingdefects on the work. In another example, the “expected class” includesan attribute indicating which rank it corresponds (e.g., rank A, B, C, .. . ) in discriminating the class on the work.

Since a plurality of image processing is often executed in parallel onone piece of image data, the “expected result” (“expected value” and/or“expected class”) may not necessarily include only the value of aspecific type (e.g., “non-defective article” or “defective article”etc.). In other words, considering a case in which each image processingis independently executed on different regions of one piece of imagedata, the result of the first image processing may be “non-defectivearticle” but the result of the second image processing may be “defectivearticle”.

When accepting such an “expected result”, the parameter determinationassisting device determines parameter candidates to be used in varioustypes of image processing. The parameter determination assisting devicethen evaluates the result obtained by performing image processing on theimage data according to the set of parameters for each parametercandidate based on the corresponding “expected result”. In other words,the parameter candidates are evaluated each other such that theparameter candidate, in which the result obtained when image processingis performed on each image data matches the “expected result”corresponding to the corresponding image data as much as possible, isselected and determined. The parameter determination assisting deviceoutputs an evaluation result for each of these parameter candidates.

In the present invention, “output” means providing the content to theuser or the device that actually determines the set of parameters, andtypically includes representing the content on the display device suchas a display, representing the content on a paper medium by a printerdevice and the like, transmitting data representing the content to anexternal device, and storing data representing the content in a storagedevice and the like.

According to the above-described configuration, an appropriate value canbe rapidly and easily determined even if the parameter has a wide rangeof values.

In the following description, the concept of including the “expectedvalue” and the “expected class” is collectively described as the“expected result”, for the sake of simplifying the description, butdescription is sometimes made using the term “expected value” or the“expected class” in a more specific description.

<B. Overall Device Configuration>

FIG. 1 is a schematic view showing an entire system according to anembodiment of the present invention.

With reference to FIG. 1, the system according to the present embodimentinclude a parameter determination assisting device (hereinafter alsosimply referred to as “assisting device”) 100 and an image processingdevice 200.

The image processing device 200 is electrically connected to an imagingunit 8 and a photoelectric sensor 4. The imaging unit 8 generates imagedata, in which a work 2 is shown, by imaging the work 2 that is conveyedon a conveyance line 6 such as a belt conveyor. The image processingdevice 200 stores the image data acquired by the imaging unit 8 andperforms image processing on each image data according to a set ofparameters set in advance, and outputs the processing result (e.g.,judgment on non-defective article or defective article).

The imaging timing of the work 2 by the imaging unit 8 is detected bythe photoelectric sensor 4 (light receiving unit and light projectingunit) arranged on both sides of the conveyance line 6. In other words,the photoelectric sensor 4 includes a light receiving unit and a lightprojecting unit arranged on the same optical axis, where a triggersignal indicating the imaging timing is output when the light receivingunit detects that the light radiated from the light projecting unit isshielded by the work 2. The imaging unit 8 includes an imaging elementsuch as a CCD (Coupled Charged Device) and aCIS(Complementary-metal-oxide-semiconductor Image Sensor) sensor, inaddition to an optical system such as a lens. The image data generatedby the imaging unit 8 may be a monochrome image or may be a color image.

The assisting device 100 receives the image data stored in the imageprocessing device 200, and executes a process for determining theoptimum set of parameters. The method of exchanging image data betweenthe assisting device 100 and the image processing device 200 includes amethod using a communication means such as an USB (Universal Serial Bus)and an Ethernet (registered trademark), and a method using a removablestorage medium such as an SD (Secured Digital) card.

As hereinafter described, all or some of the functions of the assistingdevice 100 may be incorporated in the image processing device 200, butthe process of searching for the optimum set of parameters can beexecuted on the desk in an office distant from the work site byproviding the assisting device 100 and the image processing device 200as separate bodies.

<C. Installation Procedure>

First, a work flow upon operating the visual sensor applied with theassisting device 100 according to the present embodiment on theproduction line will be described.

FIG. 2 is a diagram showing one example of a work flow upon operatingthe visual sensor on the production line. As shown in FIG. 2, theprocedure until installing the visual sensor on the production lineincludes a target confirming phase PH1 and an installing phase PH2. Theprocedure of after the visual sensor is installed on the production lineincludes an initial imaging phase PH3, an installation adjustment phasePH4, an actual imaging phase PH5, an initial setting phase PH6, anadjustment phase PH7, and an operation (improvement) phase PH8. Theinitial imaging phase PH3 and the installation adjustment phase PH4proceed in parallel, and the actual imaging phase PH5, the initialsetting phase PH6, and the adjustment phase PH7 also proceed inparallel.

In the target confirming phase PH1, the operator determines what kind ofwork to test, and which test items to perform o the work. The work alsodetermines which range of the entire work is to be tested.

In the following installing phase PH2, the operator considers the methodof installing the lens and the camera according to the installingenvironment, and installs the necessary equipment after ensuring thepower supply for driving the imaging unit, and the like.

In the initial imaging phase PH3, the installation adjustment phase PH4,the actual imaging phase PH5, and the initial setting phase PH6, theoperator selects the type of lens and camera for the image processingdevice, and selects the item to be processed in the image processingdevice. When executing pattern matching process and the like, modelregistration corresponding to the processing item is also performed. Theoperator further sets the initial value of the parameter for eachprocessing item. After various types of setting is completed, a seriesof flow operation is checked on the image data obtained by test imaging.

Through the above tasks, a series of setting (selection of imaging unit,imaging environment etc.) for imaging the work is completed. Theparameter to be set in the image processing device is then optimizedthrough trial and error. This is the adjustment phase PH7, in whichphase, the operator verifies the result obtained by image processing inthe test line and the like, and optimizes the parameter based on theverification content.

After the parameters are adjusted in the adjustment phase PH7, the phasetransitions to the operation (improvement) phase PH8 and the operationof the visual sensor starts, but the parameters are improved if somekind of false detection article is produced after checking the causethereof. The false detection article is that in which the work, which isa non-defective article, is falsely determined as a defective article,or that in which the work, which is a defective article, is falselydetermined as a non-defective article. In the present embodiment, theterm “stable” means a state in which occurrence of such a falsedetection article is small.

The assisting device 100 according to the present embodiment aims tomake the processes in the adjustment phase PH7 and the operation(improvement) phase PH8 of the phases more efficient. Although theparameters need to be readjusted if lot fluctuation and the like occurduring the operation once after the adjustment of the parameters iscompleted, the assisting device 100 according to the present embodimentcan be utilized in such a case as well. Furthermore, the parameters canbe dynamically changed according to the state in the production line byusing the assisting device 100 according to the present embodimentin-line in the operation (improvement) phase PH8.

The procedures of the outline for determining the set of parametersusing the assisting device 100 according to the present embodiment willnow be described with reference to FIG. 3A to FIG. 3C.

FIGS. 3A to 3C are conceptual views showing the procedure fordetermining the parameters according to the embodiment of the presentinvention. FIG. 3A shows a case of determining the set of parameters forone specific work. In this case, the user first sets an adjustmenttarget parameter (step S1). The image data to be evaluated and theexecuted result corresponding to such image data are set on theassisting device 100. This process will be described later withreference to FIG. 11.

After such set values are input, the assisting device 100 generates aplurality of parameter candidates, and performs an evaluation process oneach parameter candidate (step S2). The content of the evaluationprocess will be described later with reference to FIG. 16.

Finally, the user determines the parameter (or set of parameters) suitedfor the target image processing while referencing the evaluation resultoutput at the assisting device 100.

A plurality of types of work often flow on the same production line. Insuch a case, the parameter (or set of parameters) suited for the imageprocessing for each work is determined according to the procedure shownin FIG. 3B. In other words, as shown in FIG. 3B, when determining theparameters for the work A and the work B, the adjustment targetparameter setting (step S1), the evaluation process (step S2), and theparameter determination (step S3) are performed on the work A, and thenthe adjustment target parameter setting (step S4), the evaluationprocess (step S5), and the parameter determination (step S6) areperformed on the work B.

However, although the evaluation processes (steps S2 and S5) areautomatically executed by the assisting device 100, as described above,other processes need to be operated by the user. Thus, the taskefficiency of the user may lower if the process of parameterdetermination is performed on numerous works according to the procedureshown in FIG. 3B. In other words, the user may perform a different taskduring the evaluation process (steps S2 and S5) executed by theassisting device 100, but needs to frequently interrupt such a differenttask to perform the following evaluation process (steps S3 and S6).

The assisting device 100 according to the present embodiment thussupports the procedure shown in FIG. 3C. In the procedure shown in FIG.3C, the user first sets the adjustment target parameter for each of aplurality of target works (steps S1 and S4). The assisting device 100then sequentially executes the evaluation process (steps S2 and S5) inaddition to the work set with the adjustment target parameter. Finally,the user sequentially determines the parameter (or set of parameters)(steps S3 and S6) suited for image processing on each work whilereferencing the evaluation result on each work output at the assistingdevice 100.

Thus, for the user operating the assisting device 100, significant timelength can be ensured at the time of execution of the evaluation processand thus the user can perform a different task by having the assistingdevice 100 continuously execute the evaluation process. In other words,the user can ex-post obtain all necessary evaluation processes bysetting the adjustment target parameter for each work and operating theassisting device 100, whereby the efficiency enhances the greater thenumber of target works.

In the following description, the processes and configurations forimplementing the procedure shown in FIG. 3A will be described in detail,and thereafter, the processes and configurations for implementing theprocedure shown in FIG. 3C will be described in detail (<P. continuousexecution process> section described hereinafter).

<D. Hardware Configuration>

(1. Parameter Determination Assisting Device)

The assisting device 100 according to the present embodiment istypically embodied when a computer executes an installed program.Alternatively, some or all functions provided when the computer executesthe program may be embodied as a dedicated hardware circuit.

FIG. 4 is a schematic configuration diagram of a computer forimplementing the parameter determination assisting device 100 accordingto the embodiment of the present invention.

With reference to FIG. 4, the computer for implementing the assistingdevice 100 includes a monitor 102 serving as a display device, akeyboard 103 and a mouse 104 serving as an input device, a CPU (CentralProcessing Unit) 105 serving as a calculation device (processor), amemory 106 and a fixed disk 107 serving as a storage device, and an FDdrive device 111 and a CD-ROM drive device 113 serving as a data readoutdevice from a recording medium. Each unit is data communicably connectedto each other by way of a bus.

The program executed by the assisting device 100 (computer) is typicallydistributed by being stored in a flexible disk (FD) 112 or a CD-ROM(Compact Disk Read Only Memory) 114, or distributed in a form of beingdownloaded from a network connected distribution server device and thelike. The program stored in the flexible disk 112 and the CD-ROM 114 isread out from the FD drive device 111 and the CD-RPM drive device 113,respectively, and once stored in the fixed disk 107. The program is thendeveloped from the fixed disk 107 to the memory 106, and executed by theCPU 105.

The CPU 105 sequentially executes the programmed commands to carry outvarious types of calculations. The memory 106 also temporarily storesvarious types of information according to the execution of the programin the CPU 105. The fixed disk 107 is a non-volatile storage device forstoring image data to be processed, various set values, and the likeother than the program to be executed by the CPU 105.

The keyboard 103 accepts a command from the user corresponding to theinput key. The mouse 104 accepts a command from the user correspondingto the operation such as click and slide. The command accepted by thekeyboard 103 and the mouse 104 is then provided to the CPU 104.

Other output devices such as a printer may be connected to the assistingdevice 100, as necessary.

(2. Image Processing Device)

Similar to the assisting device 100, the image processing device 200according to the present embodiment is typically embodied when thecomputer executes an installed program. Alternatively, some or allfunctions provided when the computer executes the program may beembodied as a dedicated hardware circuit.

FIG. 5 is a schematic configuration diagram of a computer forimplementing the image processing device 200 according to the embodimentof the present invention.

With reference to FIG. 5, the computer for implementing the imageprocessing device 200 includes a main body 201, a monitor 202 serving asa display device, and a keyboard 203 and a mouse 204 serving as an inputdevice. The main body 201 includes, a CPU 205 serving as a calculationdevice (processor), a memory 206 and a fixed disk 207 serving as astorage device, and an FD drive device 211 and a CD-ROM drive device 213serving as a data readout device from a recording medium. The main body201 also includes a camera interface unit 209, a control informationinterface unit 215, and a sensor interface unit 217 as an interface forexchanging signals with the exterior of the main body 201. Each unit isdata communicably connected to each other by way of a bus.

The program executed by the image processing device 200 (computer) isalso typically distributed by being stored in a flexible disk (FD) 212or a CD-ROM 214, or distributed in a form of being downloaded from anetwork connected distribution server device and the like. The programstored in the flexible disk 212 and the CD-ROM 214 is read out from theFD drive device 211 and the CD-RPM drive device 213, respectively, andonce stored in the fixed disk 207. The program is then developed fromthe fixed disk 207 to the memory 206, and executed by the CPU 205.

Among the configurations of the main body 201, the CPU 205, the memory206, the fixed disk 207, the FD drive device 211, and the CD-ROM drivedevice 213 are similar to the assisting device 100, and thus thedetailed description thereof will not be repeated.

The camera interface unit 209 mediates data communication between theCPU 205 and the imaging unit 8. More specifically, the camera interfaceunit 209 includes an image buffer, so that image data imaged andcontinuously transmitted by the imaging unit 8 is once accumulated, andthe accumulated data is transferred to the memory 206 or the fixed disk207 when transfer of the image data worth at least one frame isaccumulated. The camera interface unit 209 provides an imaging commandto the imaging unit 8 according to an internal command generated by theCPU 205.

The control information interface unit 215 mediates data communicationbetween the CPU 205 and the control device (typically a PLC(Programmable Logic Controller) etc.) (not shown) for controlling theproduction line. The control information interface unit 215 accepts lineinformation and the like from an external control device, and outputs tothe CPU 205. The sensor interface unit 217 receives a trigger signalfrom the photoelectric sensor and the like, described above, and outputsto the CPU 205.

Other configurations are similar to the assisting device 100 describedabove, and the detailed description thereof will not be repeated.

<E. Example of User Interface of Image Processing Device>

First, one example of a user interface in the image processing device200 in the initial setting phase PH6 shown in FIG. 2 will be describedto facilitate the understanding on the parameter related to imageprocessing.

FIGS. 6 and 7 are diagrams showing a screen display example displayed ona monitor of the image processing device 200 according to the embodimentof the present invention. FIGS. 6 and 7 show an example of a case inwhich the search process is the processing item, as one example of imageprocessing. The screen shown in FIGS. 6 and 7 is displayed bycooperatively operating the CPU 205 of the image processing device 200and a graphic board (not shown) etc. Such screen display is implementedby a GUI (Graphical User Interface) program incorporated as one part ofthe OS (Operating System), and the GUI also provides an environment forperforming various user settings using a cursor on the screen operatedby the user with the keyboard 203 and the mouse 204.

The “search process” is a process of registering in advance thecharacteristic portion to be detected of the work as an image pattern(model), searching the portion most similar to the registered model fromthe image data, and specifying the position (coordinate value on imagedata). In this process, the degree of similarly (correlation value)indicating the extent of similarly, the position of the specified model,the tilt of the specified model, and the like are also output ascharacteristic amount. Such a search process is used in a process ofdetecting if a work of a certain type is mixed in a work of a differenttype, or detecting the work where correct printing etc. is notperformed.

As shown in FIGS. 6 and 7, in the mode of performing the setting on thesearch process, a screen where a total of six tabs corresponding to thesetting items of “model registration”, “region setting”, “detectionpoint”, “reference position”, “measurement parameter”, “outputparameter” can be selected is displayed by way of example. Among suchitems, at least three items of “model registration”, “region setting”,and “measurement parameter” require setting by the user.

With reference to FIG. 6, when a tab 301 of “model registration” isselected, a setting screen 300A is displayed. The setting screen 300Aincludes a model registration area 301#, an image display area 304, anentire display area 306, and a display control icon group 308.

In the image display area 304, the image data acquired by the imagingunit 8 is displayed. The synthesized image displayed in the imagedisplay area 304 is updated in real time during the various settings.The image data acquired by the imaging unit 8 is displayed in the entiredisplay area 306, similar to the image display area 304. The entiretarget image data is displayed in the entire display area 306independent from the display range in the image display area 304.Furthermore, the display range and the display accuracy of the imagedata to be displayed in the image display area 304 are changed accordingto the user operation (enlarge, reduce, etc.) on the display controlicon group 308.

Displayed in the model registration area 301# are a model edit button330, a registered figure display box 332, a model parameter setting area310, and a model registration image area 340.

When the user registers the model to be searched, a reference objectincluding the model is acquired in advance using the imaging unit 8, andthe operation is performed with the acquired image data displayed in theimage display area 304 and the entire display area 306.

First, a drawing tool dialogue (not shown) is displayed when the userpushes the model edit button 330 by operating the mouse 204 and thelike. The user then operates the drawing tool dialogue to specify therange to register as the model overlapping the image data displayed inthe image display area 304. FIG. 6 shows a case in which a rectangularrange including a character string “8273” is set as a model MDL on theimage display area 304. If some kind of model is already registered, theshape of the registered model is displayed in the registered figuredisplay box 332 (“rectangle” in the case of FIG. 6). The modelregistering shape is not limited to a rectangle, and may be any shapesuch as a circle, a fan-shape, or an arbitrary polygon.

When performing setting change of the registered model and the like, theuser pushes the necessary button of the model registered image area 340.The image data used in model registration is saved, and only theparameters related to the registered model can be changed afterwards.More specifically, when the registered image display button 342 ispushed, the image data used in the model registration is displayed. Whensuch a registered screen display button 342 is again pushed, the displayswitches to the display of the image data currently being input. Whenthe re-register model button 344 is pushed, it is again registered asthe model with the registered model image as is and the other parameterschanged. When the delete button 346 is pushed, the registered model isdeleted.

The model parameter setting area 310 accepts the selection of the searchmode as a setting item. The search mode is the selection of an algorithmfor evaluating to what extent it is similar to the model. For the searchmode, either “correlation” or “shape” can be selected by operating aradio button 312. The “correlation” is an algorithm for measuring thedegree of similarity by calculating the correlation value with the modelafter normalizing the brightness of the input image data. The “shape” isan algorithm for measuring the degree of similarity based on the degreeof coincidence with the contour shape of the model. Generally, a morestable measurement can be performed in the “correlation” mode.

If the “correlation” is selected in the search mode, the setting of“rotation”, “stability”, and “accuracy” can be made. If “shape” isselected in the search mode, “the setting of “rotation range” and“stability” can be made.

In the “rotation”, when the work rotates, a plurality of models in whichthe registered model is rotated by a predefined angle is internallygenerated, and the parameter related to the process of measuring thedegree of similarity based on the respective generated models isspecified. In other words, when the rotation checkbox 314 is checked,the process of rotation is validated. When the rotation range (rotationangle upper limit and rotation angle lower limit) and the interval angleare respectively input to the numerical box 315, generating a modelrotated by the interval angle over the range of the rotation range isspecified. Generally, although the stability becomes higher the smallerthe interval angle, the processing time length becomes long. A smartmode in which rotation search can be performed at high-speed can also beset.

In the “stability”, either to prioritize the stability or the processingspeed of the measurement is set. In other words, a slide bar 316 is setto any value in the range of a predetermined width (e.g., 1 to 15),where the processing time length is shorter the smaller the set value,and the stability is higher the larger the value.

In the “accuracy”, either to prioritize the position accuracy or theprocessing speed of the measurement is set. In other words, a slide bar318 is set to any value in the range of a predetermined width (e.g., 1to 3), where the processing time length is shorter the smaller the setvalue, and the accuracy is higher the larger the value.

After the above-described content is set by the user, such a content isreflected as the internal parameter of the image processing device 200by pushing an OK button 307. When a cancel button 309 is pushed, thenon-reflected parameter is reset. When the “region setting” tab 302 isselected following the model registration, a setting screen forspecifying a range for searching the model is displayed (not shown). Insuch a setting screen, the user can set an arbitrary range as the searchrange on the image display area 304. The entire input image data may bethe search range, but the search range is preferably limited to aspecific range from the standpoint of reducing the processing timelength.

With reference to FIG. 7, a setting screen 300B is displayed when the“measurement parameter” tab 303 is selected following the input of theregion setting. The setting screen 300B includes a measurement parametersetting area 303#, the image display area 304, the entire display area306, and the display control icon group 308. Displayed in themeasurement parameter setting area 303# are a determination conditionsetting area 320, a measurement condition setting area 350, and ameasurement button 352.

The measurement condition setting area 350 acceptsvalidation/invalidation of a sub-pixel process as the setting item. Thesub-pixel process measures the position information in units ofsub-pixels, although the processing time length becomes long. When theitems of the measurement condition setting area 350 is set/changed, theuser judges whether or not the search process can be correctly executedby pushing the measurement button 352.

The determination condition setting area 320 accepts the condition fordetermining as matching with the registered model (“OK”) of the degreeof similarly (correlation value) at each measured coordinate. Morespecifically, four items of a measurement coordinate X, a measurementcoordinate Y, a measurement angle, and a correlation value can be set asthe setting items. In the measurement coordinate X and the measurementcoordinate Y, the respective coordinate range to which the measuredcoordinate value (X coordinate value and Y coordinate value) is to beincluded is set by inputting the numerical value range to the numericalboxes 322 and 324, respectively. In the measurement angle, an angularrange to which the rotation angle of the measured model is to beincluded is set by inputting a numerical value range to a numerical box326. In the correlation value, a numerical value range to which thecorrelation value with the measured model is to be included is set byinputting a numerical value range to a numerical box 328.

In the search process described above, at which position (coordinate) ofthe input image the degree of similarity is high is searched bysequentially updating the region for calculating the degree ofsimilarity with the registered model in the input image. Therefore, therespective degree of similarity at a plurality of coordinates in theinput image is calculated as an actual internal process. In addition tothat having the highest value of all the calculated degrees ofsimilarities, that having the second and third highest degrees ofsimilarity may also be output as a detection result.

As described above, a relatively large number of setting items exist, asapparent from one example of the search process. The set of parametersnecessary for a series of processes is hereinafter also referred to as“parameter set”.

<F. Expected Result of Image Data>

In the visual sensor and the like, detection OK is output for the imagedata including substantially the same content as the registered model,and detection NG is output for the image data including a contentsimilar to but essentially different from the registered model.

For instance, assume that the model MDL including the character string“8273” is registered, as shown in FIG. 6. Assume that the image datashown in FIGS. 8A and 8B is input in such a case. As shown in FIG. 8A,if the image data including substantially the same content as thecharacter string “8273” contained in the registered model is input, aregion DTC1 corresponding to the model in the measurement range 514 isextracted as a region having the highest degree of similarity(correlation value). In this case, the degree of similarity (correlationvalue) measured for the region DTC1 must satisfy the determinationcondition.

As shown in FIG. 8B, if the image data including a character string“8271” different from the character string “8273” contained in theregistered model by one character is input, a region DTC2 including thecharacter string “8271” in the image data is extracted as a regionhaving the highest degree of similarity (correlation value). In thiscase, the degree of similarity (correlation value) measured for theregion DTC2 must not satisfy the determination condition.

In other words, when the model MDL including the character string “8273”is registered, the expected result (in this case, expected class) of theimage data shown in FIG. 8A is “OK” or “non-defective article”, and theexpected result of the image data shown in FIG. 8B is “NG” or “defectivearticle”.

Therefore, the assisting device 100 according to the present embodimentis premised on a state in which the expected result of being either anon-defective article or a defective article is known for each imagedata.

In the adjustment phase of the parameter of the image processing device200, a method of actually acquiring the image data includes flowing thetest work on the production line and continuously imaging the relevantwork. In hits case, the expected result may be input for each acquiredimage data after the user checks the content. Alternatively, from thestandpoint of saving power, a method of distinguishing in advance a workto be detected as a “non-defective article” and a work to be detected asa “defective article”, continuously photographing only the work of“non-defective article”, and then continuously photographing only thework of “defective article” is efficient. When such a method is used,the image data obtained by imaging the work of the “non-defectivearticle” and the image data obtained by imaging the work of the“defective article” are respectively stored in different folders so asto be easily distinguished.

<G. Outline Process>

The outline of the process in the assisting device 100 according to thepresent embodiment will now be described with reference to FIG. 9.

As shown in FIG. 9, in the assisting device 100, the image processingapplication 20 for the image data and the evaluation processingapplication 30 for the result of image processing (characteristic amountand determination result) mainly cooperatively execute the process. Theoptimum parameter set is determined based on the evaluation result 32output by the evaluation processing application 30.

More specifically, the user inputs a data set 10 including the imagedata 12 acquired by the image processing device 200, and the expectedresult 14 corresponding to the image data. As hereinafter described, theuser also inputs the item of the parameter to be adjusted, and thefluctuation step, the fluctuation range thereof to generate theparameter candidates 40 including a plurality of parameter sets to beevaluated. The image processing application 20 is an application(simulator) for executing the process same as the image processing inthe image processing device 200, and repeatedly executes the measurementprocess 22 and the determination process 24 on each image data accordingto each parameter set contained in the generated parameter candidates40. According to the measurement process 22, the characteristic amount26 upon performing the process according to each parameter candidate iscalculated for the respective image data. According to the determinationprocess 24, the determination result 28 or the result of performing thedetermination process based on the determination condition is calculatedon the respective characteristic amount calculated by the measurementprocess 22.

The evaluation processing application 30 evaluates the characteristicamount 26 and/or the determination result 28 obtained by processing therespective image data based on the expected result 14 corresponding toeach image data. More specifically, if the expected result 14 is a valueindicating whether the “non-defective article” or the “defectivearticle”, whether or not the determination result 28 obtained from theimage data given the expected result of “non-defective article” matchesthe result of “non-defective article” is judged. If the expected result14 is a character string and the like appearing in the image data,whether or not such a character string matches the character stringobtained as a characteristic amount is judged. The evaluation resultevaluated by the evaluation processing application 30 is then output soas to be comparable for each of the parameter set. In other words, theassisting device 100 assists the evaluation of each of a plurality ofparameter candidates, and the selection of the optimum parameter settherefrom.

The image processing application 20 may not necessarily mounted as longas the assisting device 100 can communicate with the image processingdevice 200. In other words, the assisting device 100 may evaluate theparameter candidate by providing the content of the parameter candidateto the image processing device 200 to cause the execution of the imageprocessing on the image data, and receiving the result of imageprocessing from the image processing device 200. The process thus can becarried out by synchronizing the assisting device 100 and the imageprocessing device 200.

<H. Example of User Interface of Parameter Determination AssistingDevice>

One example of a user interface in the assisting device 100 will now bedescribed with reference to FIGS. 10 to 23. The screens shown in FIGS.10 to 23 are displayed when the CPU 105 of the assisting device 100 andthe graphic board (not shown) etc. cooperatively operate. Such screendisplay is implemented by the GUI (Graphical User Interface) programincorporated as one part of the OS (Operating System), and the GUI alsoprovides an environment for performing various user settings using acursor on the screen operated by the user with the keyboard 103 and themouse 104.

(1. Fluctuation Setting)

First, when the execution of the evaluation processing application 30(FIG. 9) is instructed by the user in the assisting device 100, an inputscreen 400A shown in FIG. 10 is displayed. In the input screen 400A, abutton 402 for setting the image processing device 200 or the imageprocessing application 20, a button 404 for inputting the image data andthe expected result corresponding to the image data, and a button 406for specifying the adjustment target are selectably displayed.

When the user pushes the button 402 by operating the mouse 104 and thelike, a setting dialogue (not shown) is displayed. The user selects theimage processing device 200 or the image processing application 20 ofthe target for adjusting the parameter on the setting dialogue.Synchronization between the evaluation processing application 30 and theimage processing device 200 or the image processing application 20 isthereby established.

With reference to FIG. 11, when the user pushes the button 404 byoperating the mouse 104 and the like, a dialogue 414 etc. for inputtingthe target image data and the expected result corresponding to the imagedata are displayed. Here, each image data exists as one file and therespective files are stored in folders 416A and 416B distinguished bythe expected result (in this example, two ways of “non-defectivearticle” (OK) or “non-defective article (NG)). In this case, when theuser specifies the folder 416 (in the example shown in FIG. 11, foldername “111”) of higher level where the target image data is stored,specification that the image data in the “OK” folder 416A of lower levelof the “111” folder 416 is corresponding to the expected result of“non-defective article” and the image data in the “NG” folder 416B iscorresponding to the expected result of “defective article” is made. Inthe following description, the image corresponding to the expectedresult of “non-defective article” is referred as a non-defective image,and the image corresponding to the expected result of “defectivearticle” is referred as a defective image.

Another mode in the method of inputting the image data and the expectedresult corresponding to the image data will be hereinafter described.

Furthermore, when the user pushes the button 406 by operating the mouse104 and the like, a setting dialogue (not shown) is displayed. The userselects the content (processing item) of image processing for adjustingthe parameter on the setting dialogue. A list of adjustable parametersand the current set value are thereby acquired. If the assisting device100 is data communicably connected with the image processing device 200,the content set in the image processing device 200 is transferred to theevaluation processing application 30, and the current value etc. of theparameter is judged based on the transferred content.

After the setting of content described above is completed, a button 410for setting the parameter candidate, a button 408 for instructing thestart of parameter adjustment, and a button 412 for reflecting theselected parameter candidate in the image processing device 200 and thelike are selectably displayed.

First, with reference to FIG. 12, when the user pushes the button 410 byoperating the mouse 104 and the like, a dialogue 420 for inputting theconditions for generating the parameter candidate for performingadjustment of the parameter is displayed. Assume that the parameteradjustment for the search process shown in FIGS. 6 and 7 is selected bythe previous selecting operation.

In the dialogue 420, a table including a number field 432, an item field434, a current value field 436, an adjustment target field 438, afluctuation minimum value field 440, a fluctuation maximum value field442, a step field 444, and a comment field 446 is displayed. Among suchfields, the adjustment target field 438, the fluctuation minimum valuefield 440, the fluctuation maximum value field 442, the step field 444,and the comment field 446 can be arbitrarily set by the user.

In the number field 432 and the item field 434, the respective contentscontained in the parameter set of the corresponding processing content(search process in this case) is displayed in a list. The number (ID)displayed in the number field 432 is the number specifying the contentof the parameter in the internal process, and is uniquely defined forevery parameter. The item name displayed in the item field 434 isdefined to match the content displayed in the user interface shown inFIGS. 6 and 7. In the current value field 436, the currently set valueis displayed for every parameter contained in the parameter set.

The adjustment target field 438 includes a checkbox indicating whetheror not the adjustment target for each parameter contained in theparameter set. In other words, the parameter candidate is generated byfluctuating the value on the parameter given a check in the checkbox.

In the fluctuation minimum value field 440 and the fluctuation maximumvalue field 442, the fluctuation range of the parameter for generatingthe parameter candidates is specified. In the step field 444, thefluctuation step of the parameter for generating the parametercandidates is specified.

In the example shown in FIG. 12, the checkbox of the adjustment targetfield 438 is checked for two items of “stability (correlation)” and“accuracy”, and thus the parameter candidates in which the values on thetwo items are changed are generated from the current parameter set. Morespecifically, the fluctuation minimum value and the fluctuation maximumvalue is “10” and “14” for the “stability (correlation)”, and theparameter candidates in which the “stability (correlation)” isfluctuated in three ways of “10”, “12”, and “14” are generated since thestep is “2”. The fluctuation minimum value and the fluctuation maximumvalue is “2” and “3” for the “accuracy”, and the parameter candidates inwhich the “accuracy” is fluctuated in two ways of “2”, and “3” aregenerated since the step is “1”.

As a result, six parameter candidates in total are generated for thecombination of “stability (correlation”) and “accuracy”.

A series of processes including the image processing on the image dataand the evaluation of the image processing result for one parametercandidate is also referred to as “trial”. The number of trials is “six”if the above setting is made. Since longer processing time length isrequired the greater the number of generated parameter candidates, thenumber of trials scheduled to be added according to the set content isdisplayed (number of trial display 426) to serve as an indication onwhich parameter the user is to fluctuate in the range of what extent.When the user pushes the trial addition button 422 by operating themouse 104 and the like, the parameter candidates are generated accordingto the content of the fluctuation setting. A trial number is internallyassigned to the generated parameter candidate. The dialogue 420 isclosed when the close button 424 is pushed.

When the user pushes 408 by operating the mouse 104 and the like, theevaluation process of the parameter starts according to the fluctuationsetting input to the dialogue 420.

(2. Variant of Fluctuation Setting)

A user-friendlier user interface may be adopted in place of the userinterface shown in FIG. 12. A variant of such a user interface will bedescribed below with reference to FIGS. 13 to 15.

FIG. 13 is a view showing another example of the user interface in theparameter determination assisting device according to the embodiment ofthe present invention. FIG. 14 is a view showing the main parts of theuser interface corresponding setting screen shown in FIG. 13. FIG. 15 isa view for describing change in display mode of the user interface shownin FIG. 13.

A dialogue 420A shown in FIG. 13 basically differs from the dialogue 420shown in FIG. 12 in that the items contained in the item field 434 aredisplayed in correspondence to the classification to which each itembelongs (change 1), a radio button 427 for changing the display mode isadded (change 2), and a checkbox 429 for selectively displaying only theadjustment target is added (change 3). Such changes will be described indetail below.

First, the change 1 aims to clarify the correspondence with the settingitem when the user performs a setting related to image processing usingthe setting screens 300A and 300B so that the user can understand thecontent of each parameter at a glance. In other words, in the dialogue420A, a classification field 417 and the item field 434 are displayedsuch that an item contained in the setting screen 300A (see FIG. 6)displayed when the tab 301 of “model registration” is selected in thesetting screen and an item contained in the setting screen 300B (seeFIG. 7) displayed when the tab 303 of “measurement parameter” isselected in the setting screen can be distinguished. Thus, for example,the user can grasp at a glance that the items (“stability(correlation)”, “accuracy” and “stability (shape)”) corresponding to“model registration” of the classification field 417 are items that canbe set in the setting screen 300A shown in FIG. 6.

Furthermore, the tabs that can be selected by the user at the upper partof the setting screen may be represented so as to be visuallyidentifiable, and the dialogue 420A may be displayed in such a visualidentification mode. For instance, as shown in FIG. 14, each tab at theupper part of the setting screen is expressed with display attributes(“color”, “pattern”, “pattern” etc.) different from each other, and theclassification field 417 and the item field 434 of the dialogue 420A areexpressed with the display attribute same as the display attribute givento each tab. The user can intuitively grasp the content and can generatethe parameter candidates in a shorter period of time by sectionalizingthe classification and the item belonging to each classification by sucha display mode.

In the dialogue 420A, the adjustment target field 438, the current valuefield 436, a fluctuation start value field 441, a fluctuation end valuefield 443, and the step field 444 can be arbitrarily set by the user,and the fluctuation minimum value field 440 and the fluctuation maximumvalue field 442 are set with a fixed value determined under thecondition defined in advance. Therefore, in the dialogue 420A, the itemsthat can be arbitrarily set by the user are further expressed in adifferent display mode to indicate the same. In other words, thefluctuation minimum value field 440 and the fluctuation maximum valuefield 442 are expressed in the display mode same as the correspondingclassification field 417 and the item field 434, whereas the adjustmenttarget field 438, the current value field 436, the fluctuation startvalue field 441, the fluctuation end value field 443, and the step field444 are expressed in the display mode different from the correspondingclassification field 417 and the item field 434.

The changes 2 and 3 aim to perform a more efficient setting byselectively displaying only the necessary items according to the needsof the user.

In other words, either “standard” or “detailed” can be selected with theradio button 427, where only the item assumed in advance as being set arelatively great number of times is displayed when the “standard” isselected, and all items that can be set are displayed when the“detailed” is selected. For instance, in normal use, the user selects“standard” and sets the parameter as the fluctuation target for itemshaving high usage frequency. When sufficient results cannot be obtainedin the normal setting or the experienced user and the like selects“detailed” and sets the parameter as the fluctuation target for itemsnecessary depending on the situation.

For instance, FIG. 15A shows a case in which the “standard” display modeis selected, and FIG. 15B shows a case in which the “detailed” displaymode is selected. As apparent from comparison between these figures, theitem that is not displayed in the dialogue 420A shown in FIG. 15A isselectably displayed in the dialogue 420A shown in FIG. 15B.

The checkbox 429 then accepts the selection on whether or not toselectively display only the item given a check to the adjustment targetfield 438. In other words, when the checkbox 429 is selected, only theitems given a check to the adjustment target field 438 are displayed.

For instance, FIG. 15A shows a case in which the adjustment target field438 is not checked (invalidated), and FIG. 15C shows a case in which theadjustment target field 438 is checked (validated). As apparent fromcomparison between these figures, only the items given a check to theadjustment target field 438 of the items displayed in the dialogue 420Ashown in FIG. 15A are selectably displayed in the dialogue 420A shown inFIG. 15C.

The radio button 427 and the checkbox 429 each function as one type offilter independent from each other. Thus, the item selected according tothe selection at the radio button 427 is determined, and then the itemto be displayed is further extracted according to the presence of checkin the checkbox 429.

Furthermore, in the dialogue 420A, an explanation display 435 on theitems selected by the user may be displayed. With such an explanationdisplay 435, the user can more easily grasp the technical meaning andthe like of the selected items.

(3. Evaluation Result)

FIG. 16 shows an evaluation result screen 400B displayed when all trialsare completed. FIG. 16 show a result that all trials are completed, butin place of a mode of displaying the results all at once after thecompletion of the trials, the frame itself may be displayed at the startand the corresponding numerical value may be sequentially displayedalong with the progress of the trial.

In the evaluation result screen 400B, the evaluation result is outputfor each of the parameter candidates. More specifically, in theevaluation result screen 400B, a table including a trial number field452, a trial executed field 454, a false detection field 456, anon-defective article image false detection field 458, a defectivearticle image false detection field 460, a maximum measurement timelength field 462, a non-defective article image correlation valueaverage field 464, a defective article image correlation value averagefield 466, a non-defective article image correlation value 3σ field 468,and a defective article image correlation value field 470.

In the trial number field 452, the trial number assigned to eachparameter candidate generated beforehand is displayed in ascendingorder. In the trial executed field 452, a checkbox indicating whether ornot the trial on the corresponding parameter candidate is executed isdisplayed.

Displayed in the false detection field 456, the non-defective articleimage false detection field 458, and the defective article image falsedetection field 460 is a total number of falsely detected evaluationresults out of the evaluation results on the corresponding parametercandidates. More specifically, the total number of non-defective articleimage falsely determined as “defective article” is displayed in thenon-defective article image false detection field 458, and the totalnumber of defective article image falsely determined as “non-defectivearticle” is displayed in the defective article image false detectionfield 460. The value of the sum of two of the number of false detectionsis displayed in the false detection field 456.

In the maximum measurement time length field 462, the maximum value ofthe processing time length measured at the trial execution stage on eachparameter candidate is displayed. This processing time length ismeasured in the assisting device 100, and is not equal to the timelength actually measured in the image processing device 200 butcorresponds to the processing time length assumed to be required togenerate the image processing result in the image processing device 200.The time length displayed in the maximum measurement time length field462 becomes an index for taking into consideration the tact time and thelike of the actual production line when selecting an optimum parameterfrom the parameter candidates.

In the non-defective article image correlation value average field 464,the defective article image correlation value average field 466, thenon-defective article image correlation value 3σ field 468, and thedefective article image correlation value 3σ field 470, a statisticaloutput value on the degree of similarity (correlation value) measured asthe characteristic amount for the respective image data is displayed. Inother words, an average value of the entire correlation value measuredfor a plurality of input non-defective article images is displayed inthe non-defective article image correlation value average field 464, andan average value of the entire correlation value measured for aplurality of input defective article images is displayed in thedefective article image correlation value average field 466.Furthermore, a 3σ value indicating the degree of variation of the entirecorrelation value measured for a plurality of input non-defectivearticle images is displayed in the non-defective article imagecorrelation value 3σ field 468, and a 3σ value indicating the degree ofvariation of the entire correlation value measured for a plurality ofinput defective article images is displayed in the defective articleimage correlation value 3σ field 470.

In the evaluation result screen 440B, the parameter candidate in whichthe characteristic amount contained in the corresponding processingresult group is relatively high out of the parameter candidates isoutput in a mode different from other parameter candidates. In theexample shown in FIG. 16, an asterisk mark 453 is displayed for thetrial number “2” in which the non-defective article image correlationvalue average is the highest.

The item shown in FIG. 16 is that in which the characteristic amount andthe like calculated by a typical search item is reflected, where thedisplayed item is increased and decreased depending on the content ofimage processing.

As shown in FIG. 16, the user can easily select the optimum parameterset when the determination result and the statistical output aredisplayed in a list for each of a plurality of parameter candidatessubjected to trial. For instance, in the example shown in FIG. 16,although a stable process can be performed in the trial numbers “2”,“4”, and “5” in which the number of false detection is zero, theprocessing time length is the shortest in the trial number “2”, and thuscomprehensively, the parameter set of trial number “2” can be said asoptimum.

When the user operates the mouse 104 and the like to input the trialnumber of the determined parameter candidate after the optimum parameterset is determined, and then pushes the button 412 (FIG. 11), the contentof the selected parameter is reflected on the image processing device200.

Through the series of procedures, the user can more rapidly and easilydetermine the parameter of the image processing device 200.

If the lot number, the date and time, and the like are added as theexpected result, the determination result may be statistically analyzedin units of lots or time.

(4. Detailed Evaluation Result I)

The assisting device 100 according to the present embodiment may displaythe detailed evaluation result on the parameter candidate. When the userselects one of the values of the trial number field 452 by operating themouse 104 and the like on the screen shown in FIG. 16, screens shown inFIGS. 17 to 19 are displayed.

FIG. 17 shows a detailed result screen 400C showing the detailedevaluation result of the trial number “2” shown in FIG. 16. Withreference to FIG. 17, a scattergram 472 showing the distribution of thedegree of similarity (correlation value), which is the characteristicamount calculated for the selected parameter candidate, is displayed inthe detailed result screen 400C. The scattergram is a graph having animage number on the horizontal axis and a correlation value on thevertical axis. The image number is a number assigned in order to theinput image data to identify the input image data. FIG. 17 shows oneexample of a result when 437 image data are input.

In the scattergram 472, the display mode is differed according tomatching/non-matching of the processing result (determination on“non-defective article” or “defective article”) based on the correlationvalue of each image data and the corresponding expected result.

More specifically, the correlation value is plotted with the “▪” markfor those in which the processing result for the non-defective articleimage is “non-defective article” (OK), that is, for those in which theprocessing result and the expected result match. The correlation valueis plotted with the “x” mark for those in which the processing resultfor the non-defective article image is “defective article” (NG), thatis, for those in which the processing result and the expected result donot match. Similarly, the correlation value is plotted with the “▪” markfor those in which the processing result for the defective article imageis “defective article” (NG), that is, for those in which the processingresult and the expected result match. The correlation value is plottedwith the “x” mark for those in which the processing result for thedefective article image is “non-defective article” (OK), that is, forthose in which the processing result and the expected result do notmatch.

To clarify if the determination result is based on the non-defectivearticle image or the defective article image, the color is desirablydiffered for the same “▪” mark or the “x” mark so that the user caneasily determine which false detection.

Furthermore, in the scattergram 472, the width of the minimum value andthe maximum value of the correlation value measured for thenon-defective article image is displayed as a colored band 474 torepresent the degree of variation of the entire correlation valuemeasured for the non-defective article image and the defective articleimage. With the band 474, the average value of the correlation values isdisplayed as an indication line 475 for a representative value of thecorrelation values measured for the non-defective article image.Similarly, the width of the minimum value and the maximum value of thecorrelation values is displayed as a colored band 476 for arepresentative value of the correlation values measured for thedefective article image, and the average value of the correlation valuesmeasured for the defective article image is displayed as an indicationline 477.

When such a statistical output is displayed in the same graph as thecorrelation value, to what extent of identification likelihood ispresent between the characteristic amount measured for the non-defectivearticle image and the characteristic amount measured for the defectivearticle image can be grasped at one glance.

Furthermore, in the scattergram 472, a threshold value (threshold range)serving as a condition for determining whether the “non-defectivearticle image” or the “defective article image” is displayed for thecorrelation value measured from each image data. Specifically, anindication line 478A indicating the lower threshold value of thecorrelation value and an indication line 478B indicating the upperthreshold value of the correlation value are displayed as thresholdvalues to be determined as “non-defective article” in correspondence tothe scattergram 472.

As shown in FIG. 17, the parameter itself related to the process formeasuring the characteristic amount is judged as appropriate if thefluctuation range (band 474) of the characteristic amount measured fromthe non-defective article image and the fluctuation range (band 476) ofthe characteristic amount measured from the defective article image donot overlap at all on the axis of the characteristic amount (correlationvalue). If false detection nonetheless occurs, judgment is made that thesetting of the threshold value is inappropriate. For instance, the lowerthreshold value of the correlation value is set to “75%” in FIG. 17,where the defective article image is judged as “non-defective article”if the lower threshold value of the correlation value is set to “60%”.

In such a case, only the condition for determining whether the“non-defective article” or the “defective article” needs to be changed,and the characteristic amount does not need to be again measured fromthe image data. Thus, in the scattergram 472 shown in FIG. 17, thethreshold value (threshold range) is configured to be arbitrarychangeable by the user. In other words, the user can change theindication line 478A and the indication line 478B along the axis of thecorrelation value by operating the mouse 104 and the like.

When the threshold value (threshold range) is changed in such a manner,the assisting device 100 compares the respective characteristic amountmeasured by the trial executed beforehand with the threshold value ofafter the change to re-execute the determination on whether the“non-defective article” or the “defective article”. The determinationresult obtained by such re-execution is reflected on the scattergram472, and the display content of the scattergram 472 is updated.

On the contrary, FIG. 18 shows the detailed result screen 400C showingthe detailed evaluation result of the trial number “1” shown in FIG. 16,and FIG. 19 shows the detailed result screen 400C showing the detailedevaluation result of the trial number “3” shown in FIG. 16. In trialnumbers “1” and “3”, a relatively large number of false detectionoccurs. In the scattergram 472 shown in FIGS. 18 and 19, the fluctuationrange (band 474) of the correlation value measured from thenon-defective article image and the fluctuation range (band 476) of thecorrelation value measured from the defective article image arepartially overlapped on the axis of the correlation value. Thus, thecorrelation value existing at the overlapping portion does not separateregardless of how the threshold value is set. Therefore, in such a case,the parameter itself related to the process for measuring thecharacteristic amount is judged as inappropriate.

Again referring to FIG. 17, a histogram 480 of the characteristic amount(correlation value) is also displayed in the detailed result screen 400Cin correspondence to the axis of the characteristic amount (correlationvalue) of the scattergram 472. The histogram 480 represents thefrequency of the measured characteristic amount that exists in each zonefor every zone where the correlation value is sectionalized by apredetermined range. With such a histogram 480, the degree of variationof the entire measured correlation value can be checked from a differentstandpoint.

In the detailed result screen 400C, a control region for changing thedisplay mode of the scattergram 472 and the histogram 480 is provided.More specifically, an area 482 for displaying information related to theresult being displayed is provided. Furthermore, an area 484 forperforming display and change of the mark displayed in the scattergram472 is provided. In such an area 484, a list of contents and marks usedis displayed such as a mark of a case where the processing result forthe non-defective article image is “non-defective article” (OK) and amark of a case where the processing result for the defective articleimage is “non-defective article” (OK). Furthermore, the assignment ofthe mark used can be arbitrary changed by the user.

A button 485 for saving the false detection image is provided, wherewhen such a button 485 is pushed, the image in which false detectionoccurred is saved to be used to investigate the cause of occurrence etc.of the false detection. The image data used in the trial is previewdisplayed at the lower level 471 of the detailed result screen 400C.

Graphs other than the scattergram 472 can be displayed by a pull-downmenu 486. As hereinafter described, FIGS. 20 to 23 show an exampledisplaying a coordinate distribution diagram. The trial number to bedisplayed can be set by a numerical box 488, and a retrievingdestination of the image data can be set by a numerical box 490.

Furthermore, a button 492 for performing a drawing setting of thescattergram 472 and a button 494 for performing a display setting arearranged. When the button 492 is selected, a dialogue (not shown) etc.for changing such that indication lines 475 and 477 indicating therepresentative value of the measured correlation value indicate anintermediate value etc. and not the average value of the correlationvalues measured from the respective image data is displayed. When thebutton 494 is selected, a dialogue (not shown) etc. for changing suchthat the bands 474 and 476 indicate a variance width (3 a and 5 a)measured from the respective image data etc. and not the variation ofthe measured correlation values is displayed. The histogram 480 may benon-displayed.

The range of the horizontal axis of the scattergram 472 can also be set.More specifically, when the user inputs an image number to be displayedas the scattergram 472, only the correlation value measured from theimage data corresponding to the specified image number is displayed inthe scattergram 472. Furthermore, selective display such as only thecorrectly detected result or only the falsely detected result may becarried out.

In the above description, a configuration in which the threshold value(threshold range) is changed by the mouse operation on the indicationline 478A and/or 478 b displayed on the scattergram 472 has beenillustrated, but numerical values may be directly input to the numericalbox 498.

A box 473 for numerically displaying the value of each item of themeasurement result is also displayed in the detailed result screen 400C.

(5. Detailed Evaluation Result II)

In the search process shown in FIGS. 6 and 7, the measurement range canbe set as a condition for determining as matching with the registeredmodel (“OK”) (see determination condition setting area 320 of FIG. 7).In such a case, the user can appropriately set the measurement range orthe determination condition according to the displayed processing resultby displaying the processing result in correspondence to the measurementrange. A display example of the detailed evaluation result in such acase will be described below.

FIG. 20A shows a screen display example in the operation mode when thesetting related to the search process is performed on the setting screen300A shown in FIGS. 6 and 7. In the example shown in FIG. 20A, the modelMDL including the character string “8273” is registered in advance, andthe result of performing the search process on the model MDL isdisplayed for the image data acquired by the imaging unit 8. In theexample shown in FIG. 20A, the search range 512 and the measurementrange 514 or the determination condition are assumed to be set to thesame range. The search range 512 is a target region for judging thematching with the model MDL registered in advance, that is, whether ornot the region having the highest degree of similarity (correlationvalue) with the model MDL. The measurement range 514 is a thresholdrange for judging whether or not the range extracted as a region havingthe highest degree of similarity (correlation value) with the model isvalid.

In other words, when the region having the highest degree of similarity(correlation value) with the model MDL is extracted at any position ofthe search range 512, determination is made as matching with theregistered model (“OK”) if the extracted position is within themeasurement range. For instance, as a specific application example,whether or not a label of an appropriate content is attached in theproduction line and the like for attaching a label to a target productcan be judged based on whether or not a region having the highest degreeof similarity (correlation value) with the model MDL is extracted, andthen whether or not the label is attached to an appropriate position canbe judged based on whether or not the extracted position is within themeasurement range. Thus, the search range 512 and the measurement range514 may not necessarily need to be matched, and at least the searchrange 512 needs to be set larger than the measurement range 514.

Therefore, in the above-described search process, the position where aregion having the highest degree of similarity (correlation value) withthe model MDL registered in advance is extracted is preferably displayedtwo-dimensionally. In the assisting device 100 according to the presentembodiment, a coordinate distribution diagram as shown in FIG. 20B canbe displayed.

In the coordinate distribution diagram shown in FIG. 20B, the searchrange 512 set in the target search process is displayed in associationwith the two-dimensional coordinate 510 (in this example, measurementcoordinate X and measurement coordinate Y) in correspondence to theimage data input from the imaging unit 8. Specifically, a framecorresponding to the set search range 512 is shown on thetwo-dimensional coordinate 510. Furthermore, the measurement range 514set in the target search process is also displayed on thetwo-dimensional coordinate 510. In FIG. 20B, a case in which the searchrange 512 and the measurement range 514 are set to the same range isshown.

With regards to the measurement range 514, indication lines 522 and 524for defining the range in the left and right direction of the plane ofdrawing, and indication lines 532 and 534 for defining the range in theup and down direction of the plane of drawing are displayed inassociation. More specifically, a scale 520 indicating the position inthe left and right direction is displayed, and a handle for operatingthe indication lines 522 and 524 is displayed on the upper side of theplane of drawing of the two-dimensional coordinate 510. A scale 530indicating the position in the up and down direction is displayed, and ahandle for operating the indication lines 532 and 534 is displayed onthe left side of the plane of drawing of the two-dimensional coordinate510. When the user operates one of the handles, the measurement range514 changes according to the operation. One example of the detailedresult screen 500 is shown in FIGS. 21 to 23.

FIG. 21 shows one example of a detailed result screen 500 including thecoordinate distribution diagram shown in FIG. 20A. In the coordinatedistribution diagram, the position of the region extracted as having thehighest degree of similarity (correlation value) with the model MDLregistered in advance is plotted, and display is made in different modesaccording to matching/non-matching of the processing result(determination on “non-defective article” or “defective article”) basedon the correlation value of each image data and the correspondingexpected result, similar to the detailed result screen 400C shown inFIG. 17. In other words, the extracted position is plot displayed on thetwo-dimensional coordinate using the “▪” mark or the “x” mark. Toclarify if the determination result is based on the non-defectivearticle image or the defective article image, the color is desirablydiffered for the same “▪” mark or the “x” mark so that the user caneasily determine which false detection.

In the detailed result screen 500 shown in FIG. 21, the ranges of thesearch range 512 and the measurement range 514 are displayed on thecommon two-dimensional coordinate. When the user operates one of theindication lines 522, 524, 532, and 534, the current value of themeasurement range 514 or the determination condition is changed and therange of the measurement range 514 of after the change is displayed onthe two-dimensional coordinate.

For instance, FIG. 22 shows a state in which the user operates theindication line 522 to reduce the range in the left and right directionin the plane of drawing of the measurement range 514. A state in whichthe user further operates the indication line 522 to further reduce therange in the left and right direction in the plane of drawing of themeasurement range 514 is shown in FIG. 23.

As apparent from comparison between FIGS. 22 and 23, for the processingresult 508 positioned near the center of the search range 512, judgmentis made as “non-defective article” (OK) if the measurement range 514 isrelatively wide, but judgment is made as “defective article” (NG) if themeasurement range 514 is relatively narrow. Accompanied therewith, thedisplay is also changed from the “▪” mark to the “x” mark.

The user sets the measurement range 514 or the determination conditionto an appropriate range while looking at the processing result displayedon the two-dimensional coordinate. In other words, the user adjusts themeasurement range 514 so that the number of false detections becomeszero or becomes fewer.

A value indicating the range of the measurement range 514 adjusted bythe user is displayed in the determination value condition display area598.

As described above, in the detailed result screen 500 according to thepresent embodiment, an optimum measurement range 514 can be easilydetermined since the measurement range 514 or the determinationcondition can be visually adjusted in association with the position ofthe region extracted as having the highest degree of similarity(correlation value) with the model MDL registered in advance. Themeasurement range 514 is adjusted in the present embodiment, but thesearch range 512 may be adjusted through a similar operation method.

The detailed result screen 500 includes an area 582 for displayinginformation related to the result being displayed, an area 584 forperforming display and change of the mark displayed in the coordinatedistribution diagram, a button 585 for saving the false detection image,a pull-down menu 586, a numerical box 588, a numerical box 590, a button592 for performing a drawing setting of the coordinate distributiondiagram, a button 594 for performing a display setting, and a button 573for numerically displaying the value of each item of the measurementresult. These are similar to the corresponding items displayed in thedetailed result screen 400C shown in FIGS. 17 to 19, and thus thedetailed description thereof will not be repeated. The image data usedin the trial is preview displayed at the lower level 571 of the detailedresult screen 500, similar to the detailed result screen 400C shown inFIGS. 17 to 19.

<I. Input Method of Expected Result>

A configuration of providing an attribute of the expected result to thefolder name in which the image data is stored has been illustrated as aninput method of the expected result corresponding to the image data, butother configurations described below may be adopted.

(1. Configuration Using File Name of Image Data)

The expected result can be provided by embedding a character indicatingthe expected result to one part of the file name of the image data. Forinstance, the file name of “OK_xxx.jpg” is given for the non-defectivearticle image, and the file name “NG_xxx.jpg” is given for the defectivearticle image to identify the respective images. Through the use of sucha method, the expected result can be individually input for the imagedata. When having the coordinate position or the measurement value suchas the width as the expected result, such an expected result can beinput with a similar method.

(2. Configuration Using Header Portion of Image File)

The expected result can be provided by embedding a character indicatingthe expected result to the header portion of the image data. Forinstance, since the header portion is provided according to the Exifstandard in the jpeg format, the type of expected result (OK or NG), aswell as, numerical values, conditions, and the like indicating theexpected result can be stored at the relevant portion. Morespecifically, a flag indicating a non-defective article/defectivearticle is stored for the type of expected result, and numerical valuesand units are stored for the actual dimension such as the width.

(3. Configuration Using Definition File)

The expected result can be input by preparing a definition filedescribed with the expected result of each data apart from the imagedata. The type of expected result (OK or NG), as well as, numericalvalues, conditions, and the like indicating the expected result aredescribed in the definition file in correspondence to the identificationinformation such as the file name of each image data. When such adefinition file is used, a plurality of expected results can be definedon one piece of image data. For instance, considering a case in whichthe search process of the character string “ABC” and the search processof the character string “DEF” are continuously executed on the sameimage data, the image data including the character string “ABC” is anon-defective article image for the search process of the characterstring “ABC” but a defective article image for the search process of thecharacter string “DEF”. Therefore, when a plurality of measurementprocesses and determination processes are executed on the same imagedata, the expected result needs to be provided by being segmented forevery processing item, where use of the definition file in such a caseis effective.

(4. Configuration for User to Individually/Collectively Set)

When inputting the expected result of non-defective article/defectivearticle to the image data, this input may be carried out at the time ofselection of the image data on the assisting device 100. In other words,the user selects whether the selected file/folder is a non-defectivearticle or a defective article at the time of selection of the targetimage data. Here, the expected result is individually provided ifselected in units of files, and the expected result is collectivelyprovided if selected in units of folders.

<J. Control Structure>

FIG. 24 is a functional block diagram showing a control structure of theassisting device 100 according to the embodiment of the presentinvention. The control structure shown in FIG. 24 is typically providedwhen the CPU 105 of the assisting device 100 executes the program. FIGS.25A to 25D are diagrams showing a structure of a file generated in theassisting device 100 shown in FIG. 24.

With reference to FIG. 24, the assisting device 100 according to thepresent embodiment includes for its control structure, an input unit1010, a candidate generation unit 1020, a processing unit 1030, anevaluation unit 1040, and an output unit 1050.

The input unit 1010 accepts the specification of the target image andthe expected result corresponding to the respective image data from theuser. The input unit 1010 may copy the specified image data in itself,but acquires the target image data, as necessary, and outputs the entitydata to the processing unit 1030 if access can be made to the specifiedimage data. More specifically, the input unit 1010 generates an imagelist 1011 in which the target image data and the image number usedinternally are corresponding based on the specification of the imagedata, and generates an expected result list 1012 in which the imagenumber and the expected result on the corresponding image data arecorresponding. As shown in FIG. 25A, the image list 1011 is describedwith the position where the target image data exists and the file namein correspondence with the image number. As shown in FIG. 25B, theexpected result list 1012 is described with the expected result (in thisexample, non-defective article (OK) or defective article (NG)) incorrespondence with the image number.

The candidate generation unit 1020 generates the parameter candidates 40including a plurality of parameter sets in which at least one parametervalue contained in a set of parameters is differed from each other inresponse to the specification of the user. More specifically, thecandidate generation unit 1020 includes an input interface portion 1021,a parameter changing portion 1022, and a communication portion 1023. Theinput interface portion 1021 displays a dialogue 420 for inputting acondition for generating a parameter candidate to adjust the parameter,as shown in FIG. 12, according to the user operation. The inputinterface portion 1021 also outputs the content specified by the userfor the dialogue 420 to the parameter changing portion 1022. In otherwords, the input interface portion 1021 accepts the specification of atleast one of the fluctuation step and the fluctuation range of theparameter. The parameter changing portion 1022 generates a plurality ofparameter candidates according to the item specified by the user and thefluctuation step and/or fluctuation range of the parameter. Morespecifically, the parameter candidates are sequentially generated bysequentially changing the parameter value of the specified item on thevalue of the current parameter set by the specified fluctuation step.Such parameter candidates are output to the processing unit 1030.

The communication portion 1023 is configured to be data communicablewith the image processing device 200, and acquires the processing item,the value of each parameter, and the like set in the image processingdevice 200 according to the user operation. The communication portion1023 can also transfer the parameter set determined in the assistingdevice 100 to the image processing device 200.

The processing unit 1030 generates a plurality of processing results byperforming image processing on the specified image data according to aplurality of parameter candidates. More specifically, the processingunit 1030 includes an image selecting portion 1031, a parameterselecting portion 1032, a characteristic amount calculating portion1033, a determining portion 1034, a re-determining portion 1036, a timelength measurement portion 1037, and a process controller 1038.

The process of each portion in the processing unit 1030 is controlled bythe process controller 1038. In other words, when a plurality of imagedata and the characteristic amount corresponding thereto are input tothe input unit, the process controller 1038 appropriately controls theimage selecting portion 1031 and the parameter selecting portion 1032 tosequentially output the processing result on each of the plurality ofimage data for each of the plurality of parameter candidates.

The image selecting portion 1031 sequentially selects the target imagefrom the input unit 1010 according to a command from the processcontroller 1038, and outputs the same to the characteristic amountcalculating portion 1033. The parameter selecting portion 1032 alsosequentially selects the target parameter candidate from the candidategeneration unit 1020 according to a command from the process controller1038, and outputs the same to the characteristic amount calculatingportion 1033.

The characteristic amount calculating portion 1033 performs imageprocessing according to the parameter candidate selected by theparameter selecting portion 1032 on the image data selected by the imageselecting portion 1031 to calculate the characteristic amount on thetarget image data. The characteristic amount calculating portion 1033outputs the calculated characteristic amount to the determining portion1034.

The determining portion 1034 compares the characteristic amountcalculated in the characteristic amount calculating portion 1033 with athreshold value defined in advance to generate a processing result onthe target image data. Typically, the determining portion 1034 judgesthat the image data matches the model image if the correlation value,which indicates the extent the image data is similar to the model image,is greater than or equal to the threshold value. The determining portion1034 generates a determination result list 1035 showing thedetermination result together with the characteristic amount calculatedin the characteristic amount calculating portion 1033. As shown in FIG.25C, the determination result list 1035 is described with thecharacteristic amount and the determination result (in this example, OKor NG) of the target image in correspondence with the image number. Thedetermination result list 1035 is generated for every trial-executedparameter candidate.

The re-determining portion 1036 accepts change of the threshold valuewhen the threshold value (indication line 478A and indication line 478B)is changed in the detailed result screen 400C shown in FIGS. 17 to 19.The re-determining portion 1036 compares the characteristic amount onthe image data already calculated by the characteristic amountcalculating portion 1033 with the changed threshold value to re-generatethe determination result. The updated determination result is reflectedon the determination result list 1035. As hereinafter described, thedisplay of the detailed result screen 400C is updated based on thecontent of the determination result list 1035.

The time length measurement portion 1037 measures the time lengthrequired for the process in the characteristic amount calculatingportion 1033 for each parameter candidate. In other words, the timelength measurement portion 1037 measures the processing time lengthrequired to generate the processing result of one piece of image data ata certain parameter candidate. The processing time length measured inthe time length measurement portion 137 is displayed in the maximummeasurement time length field 462 and the like of the evaluation resultscreen 400B shown in FIG. 16. The time length measurement portion 1037also outputs the measured processing time length to the processcontroller 1038.

The process controller 1038 gives a command to the image selectingportion 1031 and the parameter selecting portion 1032 according to theexecution of trial on the parameter candidate. When accepting thepermissible time length specified by the user, and the processing timelength exceeding the permissible time length is measured by the timelength measurement portion 1037 during the generation of the processingresult on the image data for any parameter candidate, the processcontroller 1038 cancels the generation of the processing result on theremaining image data for the relevant parameter candidate. Thepermissible time length is set according to the tact time and the likeof the production line where the target image processing device isarranged. In other words, even with the parameter candidates capable ofperforming stable image processing, the parameter candidate for whichprocessing time length is too long cannot be applied to the actualproduction line and thus further evaluation does not need to beperformed. Therefore, the time length required for the entire trial canbe reduced by canceling the trial on the parameter candidate that isclearly inappropriate based on the request of the applicationdestination.

The evaluation unit 1040 then generates an evaluation result for each ofthe plurality of processing results by comparing each of the pluralityof processing results with the corresponding expected result. Morespecifically, the evaluation unit 1040 includes a comparing portion1041, a match/non-match counter 1043, a cancel processing portion 1044,a statistical processing portion 1045, a histogram generating portion1046, and a determining portion 1047.

The comparing portion 1041 compares the expected result on each imagedata acquired from the input unit 1010 with the determination resultgenerated by the determining portion 1034, and evaluates whether or notthe contents match. More specifically, the comparing portion 1041generates an evaluation result list 1042 showing the evaluation resultin correspondence with the image number. As shown in FIG. 25D, theevaluation result list 1042 is described with a correspondencerelationship of the determination result and the expected result of thetarget image data in correspondence with the image number. A descriptionexample includes “OK-OK” indicating that the evaluation result on theimage data given the expected result of non-defective article (OK) isnon-defective article (OK), and “OK-NG” indicating that the evaluationresult on the image data given the expected result of non-defectivearticle (OK) is a defective article (NG). Only either match or non-matchmay be described, but if the contents do not match, that is, whenerroneous determination occurs, the details thereof cannot be analyzedand thus the type thereof is preferably recorded. The evaluation resultlist 1042 is generated for every parameter candidate for which trial hasbeen executed.

The match/non-match counter 1043 calculates the degree of coincidencewith the corresponding expected result for the evaluation resultcontained in a plurality of evaluation result list 1042 generated by thecomparing portion 1041. More specifically, the match/non-match counter1043 counts the number of evaluation results that do not match thecorresponding expected result (falsely detected) of the evaluationresults contained in the evaluation result list 1042. The number oftimes the image data of “non-defective article” (OK) is erroneouslydetermined as “defective article” (NG) and the number of times the imagedata of “defective article” (NG) is erroneously determined as“non-defective article” (OK) are preferably counted in a distinguishedmanner.

When accepting the tolerable upper limit specified by the user, and thenumber of processing results that do not match the correspondingexpected result exceeds the specified tolerable upper limit during thegeneration of the processing result on the image data for any parametercandidate, the cancel processing portion 1044 cancels the generation ofthe processing result on the remaining image data for the relevantparameter candidate. The tolerable upper limit is set according to thestability and the like required on the target image processing device.In other words, since judgment can be made as a parameter candidate thatcannot perform a stable image processing when the number of falsedetections exceeds the tolerable upper limit, further evaluation doesnot need to be performed. Therefore, the time length required for theentire trial can be reduced by canceling the trial on the parametercandidate that is clearly inappropriate based on the request of theapplication destination. The cancel processing portion 1044 gives acancel instruction to the process controller 1038 of the processing unit1030.

The statistical processing portion 1045 calculates a statistical outputfor the evaluation result calculated in the processing unit 1030. Morespecifically, the statistical processing portion 1045 calculates thestatistic value (e.g., average value, intermediate value, maximum value,minimum value, variance value, standard deviation, etc.) of thecorrelation value contained in the determination result list 1035calculated by the characteristic amount calculating portion 1033 forevery parameter candidate.

The histogram generating portion 1046 generates data of the histogram(frequency distribution), in which the characteristic amount issegmented into zones defined in advance based on the statistic valuecalculated by the statistical processing portion 1045, for everyparameter candidate.

The determining portion 1047 determines the most appropriate parametercandidate out of the parameter candidates generated by the candidategeneration unit 1020 according to the condition specified by the user.More specifically, the determining portion 1047 accepts the condition tobe satisfied by the evaluation result, and determines the processingresult that is most adapted to the specified condition out of theprocessing results generated by performing the process according to eachof the plurality of parameter candidates. The process of the determiningportion 1047 will be described later.

The output unit 1050 outputs the evaluation result generated by theevaluation unit 1040 for each of a plurality of parameter candidates.More specifically, the output unit 1050 is prepared with various typesof output modes, examples of which are table output function (FIG. 16),histogram output function (FIGS. 17 to 19), and scattergram outputfunction (FIGS. 17 to 19). Such output modes are appropriately switchedaccording to the user operation. The output unit 1050 outputs the degreeof coincidence with the corresponding expected result on the evaluationresult calculated by the match/non-match counter 1043 and the number ofprocessing results that do not match the corresponding expected resultfor the table output function. The output unit 1050 also outputs themeasured processing time length together with the evaluation result forthe table output function.

The output unit 1050 outputs the processing result contained in theprocessing result group so as to be comparable for each of thecorresponding image data for the scattergram output function. In otherwords, the output unit 1050 outputs the distribution of thecharacteristic amount (correlation value) on the processing result withthe target image data on either axis for a certain parameter candidate.In this case, the output unit 1050 outputs the processing result basedon each characteristic amount in a different display mode according tothe match/non-match with the corresponding expected result in the outputscattergram. The output unit 1050 also outputs the threshold value(threshold range) given to the determining portion 1034 incorrespondence with the scattergram. In the scattergram, the user canchange the threshold value (threshold range), where when thedetermination result is re-generated by the re-determining portion 1036in response to the change of the threshold value, such a re-generateddetermination result is reflected on the scattergram.

The output unit 1050 may further output the parameter candidate in whichthe characteristic amount (correlation value) contained in thecorresponding processing result group is relatively high of theplurality of parameter candidates in a mode different from otherparameter candidates for the table output function. In other words, theparameter candidate having the highest average value of the correlationvalue is preferably output so as to stand out by displaying in red,flash displaying, and the like. This is to urge the user topreferentially select such a parameter candidate since a highcharacteristic amount (correlation value) means that the characteristicsof the image data can be satisfactorily extracted by image processingaccording to the relevant parameter candidate.

<K. Condition Specification>

One example of an input interface of the condition for the determiningportion 1047 (FIG. 24) of the evaluation unit 1040 to select the mostappropriate parameter candidate out of the parameter candidates will bedescribed with reference to FIG. 26.

After the setting on the parameter candidates on the dialogue 420 shownin FIG. 12, the user sets which item to prioritize in the dialogue 499shown in FIG. 26. In the dialogue 499, a list of items to be output tothe evaluation result screen 400B shown in FIG. 16 is displayed, wherethe user sets priority indicating whether to prioritize on the necessaryitems by operating the pull-down menu. In the example shown in FIG. 26,the priority “1” is set to “number of false detections: few”, and thepriority “2” is set to “maximum measurement time length: short”.

When the condition shown in FIG. 26 is set, the determining portion 1047searches for the parameter candidate with the fewest number of falsedetections with reference to the evaluation result for every generatedparameter candidate. If narrowed to one as a result of the search, therelevant parameter candidate is determined as the optimum parameter set.If not narrowed to one with only the condition on the number of falsedetections, the parameter candidate having the shortest maximummeasurement time length among the parameter candidates is extracted asthe optimum parameter set.

The method of setting conditions by the user may adopt various methodsother than the method by user interface shown in FIG. 26.

<L. Processing Procedure>

FIGS. 27 and 28 are flowcharts showing the overall process in theassisting device 100 according to the embodiment of the presentinvention. The flowcharts shown in FIGS. 27 and 28 are implemented whenthe CPU 105 reads out a program stored in advance in the fixed disk 107and the like to the memory 106, and executes the program.

With reference to FIGS. 27 and 28, the CPU 105 displays a menu screen(FIG. 10) on the monitor 102 after the execution of the initializingprocess (step S100). The CPU 105 then judges whether or not the button402 on the menu screen is pushed (step S102). If the button 402 ispushed (YES in step S102), the CPU 105 acquires the current processingitem, the value of each parameter and the like from the image processingdevice 200 of the connecting destination (or simulator functioning as avirtual image processing device) (step S104). Thereafter, the processproceeds to step S106. If the button 402 is not pushed (NO in stepS102), the process of step S102 is repeated.

The CPU then judges whether or not the button 404 on the menu screen ispushed (step S106). If the button 404 is pushed (YES in step S106), theCPU 105 displays a dialogue 414 and the like on the monitor 102, andaccepts the target image and the expected result corresponding to theimage data (step S108). The CPU 105 generates an image list in which thetarget image data and the image number used internally are correspondingbased on the specification of the image data, and generates an expectedresult list in which the image number and the expected result on thecorresponding image data are corresponding (step S110). The process thenproceeds to step S112. If the button 404 is not pushed (NO in stepS106), the process of step S106 is repeated.

The CPU 105 then judges whether or not the button 406 on the menu screenis pushed (step S112). If the button 406 is pushed (YES in step S112),the CPU 105 displays a dialogue and the like on the monitor 102, andaccepts the content (processing item) of the image processing foradjusting the parameter (step S114). The process then proceeds to stepS116. If the button 406 is not pushed (NO in step S112), the process ofstep S112 is repeated.

The CPU 105 then judges whether or not the button 410 on the menu screenis pushed (step S116). If the button 410 is pushed (YES in step S116),the CPU 105 displays a dialogue 420 for inputting the fluctuationsetting of the parameter on the monitor 102 based on the content(processing item) of the selected image processing (step S118). The CPU105 accepts the item of the parameter to be adjusted, and thefluctuation step and the fluctuation range thereof, which are input tothe dialogue 420 (step S120). Then, the CPU 105 judges whether or notthe trial addition button 422 on the dialogue is pushed (step S122). Ifthe trial addition button 422 is pushed (YES in step S122), the CPU 105generates parameter candidates based on the fluctuation setting of theset parameter (step S124). In this case, the CPU 105 assigns a trialnumber to the generated parameter. The process then proceeds to stepS126. If the trial addition button 422 is not pushed (NO in step S122),the process of step S122 is repeated. The CPU 105 closes the dialogue420 when the close button 424 on the dialogue 420 is pushed.

The CPU 105 then judges whether or not the button 408 on the menu screenis pushed (step S126). If the button 408 is not pushed (NO in stepS126), the process of step S126 is repeated.

If the button 408 is pushed (YES in step S126), the CPU 105 starts thetrial, which is the evaluation of the value on each parameter candidate.Specifically, the CPU 105 sets the parameter candidate corresponding tothe smallest trial number (trial number [0]) (step S128). The CPU 105acquires the image data corresponding to the smallest image number(trial number [0]) (step S130). The CPU 105 calculates thecharacteristic amount by performing image processing on the acquiredimage data according to the set parameter candidate (step S132).Thereafter, the CPU 105 stores the calculated characteristic amount inthe file in correspondence with the trial number and the image number(step S134). The CPU 105 then compares the calculated characteristicamount with the threshold value set in advance, calculates thedetermination result on the target image data and stores the same in thefile (step S136), and furthermore, calculates the evaluation result ofevaluating the calculated determination result based on the expectedresult corresponding to the target image data, and stores the same inthe file (step S138).

Thereafter, the CPU 105 judges whether or not the process based on theparameter candidate currently being selected is completed on all imagedata (step S140). If not completed on all image data (NO in step S140),the CPU 105 acquires the image data corresponding to the next imagenumber of the current image number (step S142). The processes after stepS132 are then repeated.

If completed on all image data (YES in step S140), the CPU 105calculates the statistic value on the characteristic amount calculatedfor the current trial number and the evaluation result (step S144). TheCPU 105 then judges whether or not the processes on all the generatedparameter candidates is completed (step S146). If there is a generatedparameter candidate on which the process is not completed (NO in stepS146), the parameter candidate corresponding to the next trial number ofthe current trial number is set (step S148). The processes after stepS130 are repeated.

If the process on the generated parameter candidate is completed (YES instep S146), the CPU 105 determines the suited parameter set based oneach result calculated in advance (step S150). The CPU 105 then displaysthe evaluation result screen shown in FIG. 16 on the monitor 102 (stepS152).

The CPU 105 judges whether or not the button 412 on the menu screen ispushed (step S154). If the button 412 is pushed (YES in step S154), theCPU 105 transfers the content of the selected parameter candidate to theimage processing device 200 of the connecting destination (or simulatorfunctioning as a virtual image processing device) (step S156). If thebutton 412 is not pushed (NO instep S154), the CPU 105 judges whether ornot termination of the application is instructed (step S158). If thetermination is instructed (YES in step S158), the CPU 105 terminates theprocess. If the termination is not instructed (NO in step S158), theprocess of step S154 is repeated.

<M. First Variant>

In the flowchart showing the overall process in the assisting device 100according to the embodiment described above, the procedure ofsequentially executing the process on the target image data aftersetting the respective parameter candidates has been described, but theprocess may be executed on each parameter candidate after reading outthe target image data beforehand. This method is effective in anenvironment where time is required for reading out and transferring theimage data, and when performing the evaluation of the parametercandidates in parallel while generating new image data by imaging thework flowing the production line.

The first half of the overall process according to the first variant issimilar to the flowchart shown in FIG. 27, but the second half is theprocessing procedure shown in the flowchart of FIG. 29. The descriptionon the content shown in FIG. 27 is not repeated.

With reference to FIG. 29, if the button 408 on the menu screen ispushed (YES in step S126), the CPU 105 starts the trial, which is theevaluation of the value on each parameter candidate. Specifically, theCPU 105 acquires the image data corresponding to the smallest imagenumber (trial number [0]) (step S162). The CPU 105 sets the parametercandidate corresponding to the smallest trial number (trial number [0])(step S164).

The CPU 105 calculates the characteristic amount by performing imageprocessing on the acquired image data according to the set parametercandidate (step S166). Thereafter, the CPU 105 stores the calculatedcharacteristic amount in the file in correspondence with the trialnumber and the image number (step S168). The CPU 105 then compares thecalculated characteristic amount with the threshold value set inadvance, calculates the determination result on the target image dataand stores the same in the file in correspondence with the trial number(step S170), and furthermore, calculates the evaluation result ofevaluating the calculated determination result based on the expectedresult corresponding to the target image data, and stores the same inthe file in correspondence with the trial number (step S172).

Thereafter, the CPU 105 judges whether or not the process on allgenerated parameter candidates is completed (step S174). If there is agenerated parameter candidate on which the process is not completed (NOin step S174), the parameter candidate corresponding to the next trialnumber of the current trial number is set (step S176). The processesafter step S166 are repeated.

If the process on the generated parameter candidates is completed (YESin step S174), the CPU 105 judges whether or not a series of processesis completed on all image data (step S178). If a series of process isnot yet completed on all image data (NO in step S178), the CPU 105acquires the image data corresponding to the next image number of thecurrent image number (step S180). The processes after step S164 arerepeated.

If a series of processes is completed on all image data (YES in stepS178), the CPU 105 calculates the statistic value on the characteristicamount calculated for the current trial number and the evaluation result(step S182). The CPU 105 then determines the suited parameter set basedon each result calculated in advance (step S184). The CPU 105 thendisplays the evaluation result screen shown in FIG. 16 on the monitor102 (step S186).

The CPU 105 judges whether or not the button 412 on the menu screen ispushed (step S154). If the button 412 is pushed (YES in step S154), theCPU 105 transfers the content of the selected parameter candidate to theimage processing device 200 of the connecting destination (or simulatorfunctioning as a virtual image processing device) (step S156). If thebutton 412 is not pushed (NO instep S154), the CPU 105 judges whether ornot termination of the application is instructed (step S158). If thetermination is instructed (YES in step S158), the CPU 105 terminates theprocess. If the termination is not instructed (NO in step S158), theprocess of step S154 is repeated.

<N. Second Variant>

The processing procedure of a case where the process of canceling thetrial on the parameter candidate considered inappropriate according tothe measurement time length and/or the number of false detections ineach process is added is described in the flowchart shown in FIG. 30. Inthis case as well, the processing procedure of the first half is similarto the flowchart shown in FIG. 27, and thus the detailed descriptionthereof will not be repeated.

FIG. 30 is a flowchart (second half) showing the overall process in theassisting device 100 according to a second variant of the embodiment ofthe present invention. The flowchart shown in FIG. 30 has the processesof steps S133, S139, S192, and S194 added to the flowchart shown in FIG.28.

After the execution of step S132, the CPU 105 measures the processingtime length required to calculate the characteristic amount byperforming image processing on the acquired image data according to theset parameter candidate (step S133).

After the execution of step S138, the CPU 105 counts the number of falsedetections when the calculated determination result does not match theexpected result corresponding to the target image data (step S139). TheCPU 105 subsequently judges whether or not the processing time lengthmeasured in step S134 exceeds the specified permissible time length(step S192).

If the measured processing time length exceeds the set permissible timelength (YES in step S192), the CPU 105 cancels the generation of theprocessing result on the remaining image data for the currently setparameter candidate. More specifically, the CPU 105 executes the processof step S148.

If the measured processing time length does not exceed the setpermissible time length (NO in step S192), the CPU 105 judges whether ornot the number of false detections counted in step S139 exceeds aspecified tolerable upper limit (step S194).

If the counted number of false detections exceeds the specifiedtolerable upper limit (YES in step S194), the CPU 105 cancels thegeneration of the processing result on the remaining image data for thecurrently set parameter candidate. More specifically, the CPU 105executes the process of step S148.

If the counted number of false detections does not exceed the specifiedtolerable upper limit (NO in step S194), the process proceeds to stepS140.

The processes in other steps of the processes shown in FIG. 30 aresimilar to FIG. 27, and thus the detailed description thereof will notbe repeated.

<O. Two-Stage Adjustment>

If there are many types for the parameters contained in the parameterset, which parameter to adjust may not be easily found. In such a case,a method of judging the parameter to be adjusted in rough adjustment,and then fine tuning the optimum value thereof is also effective.

In such a case, the assisting device 100 first generates a firstparameter candidate group for rough adjustment including a plurality ofparameter candidates. The user then judges which parameter item toadjust based on the evaluation result on the first parameter candidategroup. When the judgment content is input to the assisting device 100,the assisting device 100 generates a second parameter candidate groupfor fine adjustment having a fluctuation step smaller than thefluctuation step between the parameter candidates contained in the firstparameter candidate group. An appropriate parameter set is searchedbased on the evaluation result on the second parameter candidate group.

Optimization is realized by performing in two or more stages withoutmistaking the direction even on an enormous number of parameters.

<P. Continuous Execution Process>

The continuous execution process shown in FIG. 3C will be describedbelow.

FIG. 31 is a diagram for describing the outline of the continuousexecution process in the parameter determination assisting deviceaccording to the embodiment of the present invention. FIG. 32 is adiagram showing one example of the user interface at the time of thecontinuous execution process in the parameter determination assistingdevice according to the embodiment of the present invention. FIG. 33 isa flowchart at the time of the continuous execution process in theparameter determination assisting device according to the embodiment ofthe present invention.

The outline of the process on the continuous execution process accordingto the present embodiment will be described first with reference to FIG.31. As shown in FIG. 31, at the time of the continuous executionprocess, parameter candidates 40-1, 40-2, . . . , and 40-N including aplurality of parameter sets to be evaluated are respectively set foreach of the works (or image processing) to be a trial target.

More specifically, the user sequentially generates the parametercandidates on each work (or image processing) using the user interfaceshown in FIGS. 10 to 13. In other words, the user repeats the operationsshown in FIGS. 10 to 12 at least by the number of target works. Theparameter candidates set by the user are saved as a file. Thereafter,the user selects the parameter candidates (each includes a plurality ofparameter sets to be the trial target) to be the targets of thecontinuous execution process using a continuous trial execution settingdialogue 600 as shown in FIG. 32.

The continuous trial execution setting dialogue 600 includes a box 602where the parameter candidates that are already created are displayed ina list, and a box 606 where the parameter candidates selected as thetargets of the continuous execution process are displayed in a list. Inthe example shown in FIG. 32, each data having an extension “bak”displayed in the box 602 corresponds to one parameter candidateincluding a plurality of parameter sets. The user selects a file namecorresponding to the parameter candidate to be the target of thecontinuous execution process on the box 602, and then pushes the addbutton 604. The selected file (parameter candidate) is then added to thebox 606.

Through the above operations, the trial process starts when the userdetermines the parameter candidate to be the target of the continuousexecution process and then pushes an execute button 608. The process iscanceled when the user pushes a cancel button 610.

Buttons 612 and 614 for changing the execution order are displayed inassociation with the box 606. When the user buttons the button 612 or614 after selecting the file (parameter candidate) displayed in the box606, the selected file moves to the upper side or the lower side incorrespondence with the other files. The order of files displayed in thebox 606 corresponds to the execution order of the trial, and the filedisplayed at higher level is executed earlier.

With reference again to FIG. 31, the image processing application 20repeatedly executes the measurement process 22 and the determinationprocess 24 on all the parameter candidates 40-1, 40-2, . . . , and 40-Nset in advance. In parallel thereto, the evaluation processingapplication 30 evaluates the characteristic amount 26 and/or thedetermination amount 28 obtained by processing the respective image databased on the expected result 14 corresponding to each image data.

Through such processes, a plurality of evaluation results 32-1, 32-2, .. . , 32-N corresponding to the plurality of parameter candidates 40-1,40-2, . . . , and 40-N are generated. The user sequentially determinesthe optimum parameter set by performing the operations shown in FIGS. 16to 19 and FIGS. 21 to 23 for each of the plurality of evaluation results32-1, 32-2, . . . , 32-N.

A button 412 for reflecting the selected parameter candidate on theimage processing device 200 and the like is selectably displayed in theinput screen 400A shown in FIGS. 10 and 11. In the input screen 400A,the parameter candidate as a trial target and the image processingsetting (of image processing device 200 and the like) corresponding tothe parameter candidate are associated, where each value of theparameter set adjusted by the user is reflected on a correspondingspecific image processing flow of the image processing device 200 bypushing the button 412. Thus, even if a plurality of image processinglows is set for a plurality of works in the same image processing device200, the drawback in that the user mistakenly reflects the value of theparameter set for a certain work as the value of the parameter set for adifferent work can be avoided.

The processing procedure at the time of the continuous execution processaccording to the present embodiment will be described with reference toFIG. 33. The flowchart shown in FIG. 33 is implemented when the CPU 105reads out the program stored in advance in the fixed disk 107 and thelike, and executes the program.

First, the CPU 105 displays a menu screen (FIG. 10) on the monitor 102after the execution of the initialization process (step S200). The CPU105 then judges whether or not acquisition of image processing (imageprocessing flow by works) set in the target image processing device 200(or simulator functioning as virtual image processing device) isrequested (step S202). If acquisition of image processing (imageprocessing flow by works) set in the target image processing device 200(or simulator) is requested (YES in step S202), the process proceeds tostep S204. If acquisition of image processing (image processing flow byworks) set in the target image processing device 200 (or simulator) isnot requested (NO in step S202), the process of step S202 is repeated.

In step S204, the CPU 105 connects to the target image processing device200 (or simulator), and acquires the set image processing (imageprocessing flow by works). Here, the user sets the image processing(image processing flow by works) to adjust in the target imageprocessing device 200 (or simulator). In this process, one or one of aplurality of image processing registered in advance in the imageprocessing device 200 (or simulator) is selected and read out.

The CPU 105 then executes the processes similar to steps S102 to S124shown in FIG. 27 (step S206). The detailed description of such processeswill not be repeated. The process then proceeds to step S208.

In step S208, the CPU 105 saves data defining the parameter candidates(a plurality of parameter sets) generated by the process of step S206.In other words, one of a plurality of files having an extension of “bak”shown in FIG. 32 is generated. The process then proceeds to step S212.

The CPU 105 judges whether or not generation of a new parametercandidate is requested (step S212). In other words, the CPU 105 judgeswhether or not the user instructed generation of another furtherparameter candidate. If generation of a new parameter candidate isrequested (YES in step S212), the process of step S204 is repeated. Inthis case, the user sets a different image processing (image processingflow by works) desired to be contained in the same continuous executionprocess as the image processing (image processing flow by works) set tobe adjusted in advance in the target image processing device 200 (orsimulator).

If generation of a new parameter candidate is not requested (NO in stepS212), the process proceeds to step S214.

The CPU 105 then displays a screen (continuous trial execution settingdialogue 60 shown in FIG. 32) for selecting the parameter candidate tobe the target of the continuous execution process on the monitor 102(step S214). The CPU 105 selects the parameter candidate to be thetarget of the continuous execution process according to the useroperation (step S216). The CPU 105 then judges whether or not theexecute button 608 on the continuous trial execution setting dialogue600 is pushed (step S218). If the execute button 608 is pushed (YES instep S218), the process proceeds to step S220. If the execute button 608is not pushed (NO in step S218), the process of step S216 is repeated.

In step S220, the CPU 105 selects the first parameter candidate out ofthe parameter candidates set as the targets of the continuous executionprocess, and executes processes similar to steps S128 to S150 shown inFIG. 28 (step S222). The detailed description of such processes will notbe repeated. Thereafter, the process proceeds to step S224.

In step S224, the CPU 105 judges whether or not trial on all parametercandidates set as the targets of the continuous execution process iscompleted. If the trial on all the parameter candidates set as thetargets of the continuous execution process is not completed (NO in stepS224), the process proceeds to step S226. If the trial on all theparameter candidates set as the targets of the continuous executionprocess is completed (YES instep S224), the process proceeds to stepS228.

In step S226, the CPU 105 selects the next parameter candidate out ofthe parameter candidates set as the targets of the continuous executionprocess, and repeats the process of step S222.

In step S228, the CPU 105 displays the evaluation result screen (seeFIG. 16) on the first parameter candidate out of the parametercandidates set as the targets of the continuous execution process on themonitor 102.

The CPU 105 then judges whether or not the button 412 on the menu screenis pushed (step S230). If the button 412 is pushed (YES in step S230),the CPU 105 transfers the content of the selected parameter candidate tothe image processing device 200 (or simulator functioning as virtualimage processing device) of the connecting destination (step S232).After step S232 or if the button 412 is not pushed (NO in step S230),the CPU 105 judges whether or not the display of the evaluation resulton the next parameter candidate out of the parameter candidates set asthe targets of the continuous execution process is instructed (stepS234). If the display of the evaluation result on the next parametercandidate out of the parameter candidates set as the targets of thecontinuous execution process is instructed (YES in step S234), the CPU105 displays the evaluation result screen (see FIG. 16) on the nextparameter candidate out of the parameter candidates set as the targetsof the continuous execution process (step S236). The process of stepS230 is thereafter repeated. If the display of the evaluation result onthe next parameter candidate out of the parameter candidates set as thetargets of the continuous execution process is not instructed (NO instep S234), the process proceeds to step S238.

In step S238, the CPU 105 judges whether or not termination of theapplication is instructed. If the termination is instructed (YES in stepS238), the CPU 105 terminates the process. If the termination is notinstructed (NO in step S238), the process of step S230 is repeated.

<Q. Effects of Present Embodiment>

According to the embodiment of the present invention, the user canobtain a list of evaluation results on the parameter candidate obtainedby combining the values of each parameter by simply setting the item ofthe parameter to be adjusted, the fluctuation step of the parameter, andthe fluctuation range of the parameter. The user thus can easily selectthe optimum parameter candidate based on the evaluation resultsdisplayed in a list.

In other words, the user does not need to perform the adjustment over along period of time at the site since the content to be adjusted merelyneeds to be set and other processes are automatically executed by theparameter determination assisting device. Thus, even with the parameterset including great number of parameters, the optimum value thereof canbe rapidly and easily determined.

According to the embodiment of the present invention, the user can checkthe details of the content after the determination result on theparameter candidate is output. Furthermore, since the threshold valueused for determining the result can be ex-post changed, the user mayadopt a method of optimizing the parameters used in the calculationprocess of the characteristic amount, and then further adjusting thethreshold value contained in the determination condition.

Other Embodiments

The program according to the present invention may include calling anecessary module, of the program modules provided as part of theoperating system (OS) of the computer, with a predetermined array and ata predetermined timing and executing the process. In such a case, themodule is not contained in the program itself, and the process isexecuted in cooperation with the OS. The program not including themodule is also encompassed in the program of the present invention.

The program according to the present invention may be provided by beingincorporated in one part of other programs. In such a case as well, theprogram itself does not include the module contained in other programs,and the process is executed in cooperation with other programs. Theprogram incorporated in such other programs is also encompassed in theprogram of the present invention.

The program product to be provided is executed by being installed in aprogram storage unit such as a hard disk. The program product includesthe program itself and the recording medium on which the program isstored.

Some or all of the functions implemented by the program of the presentinvention may be configured by dedicated hardware.

The embodiments disclosed herein are illustrative in all aspects andshould not be construed as being restrictive. The scope of the inventionis defined by the claims rather than by the above description, and allmodifications equivalent in meaning to the claims and within the scopethereof are intended to be encompassed therein.

What is claimed is:
 1. A parameter determination assisting device for animage processing device configured to obtain a processing result byperforming a process using a set of parameters defined in advance onimage data obtained by imaging a measuring target object, the parameterdetermination assisting device comprising: an input unit configured toaccept the image data and an expected result corresponding to the imagedata, wherein the expected results each includes an expected classindicating whether the corresponding measuring target object is anon-defective article or a defective article; a candidate generationunit configured to generate a plurality of parameter candidates in whichat least one parameter value contained in the set of parameters isdifferent from each other, wherein at least one of the plurality of theparameter candidates is length of processing time; an acquiring unitconfigured to acquire a plurality of processing results respectivelyusing the plurality of parameter candidates on the image data accordingto a condition; an evaluation unit configured to generate an evaluationresult for each of the plurality of processing results by comparing eachof the plurality of processing results with the corresponding expectedresult; and an output unit configured to output the evaluation resultfor each of the plurality of parameter candidates, wherein the inputunit is configured to accept the plurality of image data respectivelyacquired from a plurality of measuring target objects and the expectedresults respectively corresponding to the plurality of image data, andthe acquiring unit is configured to acquire a processing result groupincluding the evaluation results on the plurality of image data for theplurality of parameter candidates respectively, the acquiring unitincludes: a portion configured to calculate a characteristic amount onthe image data by performing the process on the image data; and aportion configured to generate the processing result by comparing thecharacteristic amount with a threshold value provided in advance, andthe output unit is configured to output the condition; output theevaluation result with a mark indicating a match between the processingresult and the expected result in a different manner from a markindicating a mismatch between the processing result and the expectedresult; and output an area for displaying the mark indicating the matchbetween the processing result and the expected result in a differentmanner from another area.
 2. The parameter determination assistingdevice according to claim 1, wherein the evaluation unit includes: aportion configured to accept the condition to be satisfied by theevaluation result; and a portion configured to determine a processingresult most adapted to the condition out of the plurality of processingresults respectively using the plurality of parameter candidates, andthe output unit configured to output the determined processing result.3. The parameter determination assisting device according to claim 1,wherein the candidate generation unit includes: a portion configured toaccept a specification of at least one of a fluctuation step and afluctuation range of the parameter value; and a portion configured togenerate the plurality of parameter candidates according to thespecified fluctuation step and/or the fluctuation range of the parametervalue.
 4. The parameter determination assisting device according toclaim 3, wherein the candidate generation unit is configured to accept aspecification only on a specific parameter defined in advance out of theparameter values contained in the set of parameters.
 5. The parameterdetermination assisting device according to claim 3, wherein the imageprocessing device is configured to provide a user interface foraccepting a setting of the set of parameters on the process performed onthe image data, the parameters contained in the set of parameters beingdisplayed in a visually sectionalized manner on the user interface, andthe candidate generation unit is configured to display each of theparameters contained in the set of parameters so as to correspond to avisual section displaying the parameter in the user interface.
 6. Theparameter determination assisting device according to claim 1, whereinthe acquiring unit is configured to output a value indicating either thenon-defective article or the defective article as the processing result,the evaluation unit includes a portion configured to calculate a degreeof coincidence with the corresponding expected class out of theplurality of processing results contained in each of the processingresult group, and the output unit is configured to output the degree ofcoincidence.
 7. The parameter determination assisting device accordingto claim 6, wherein the degree of coincidence is the number ofprocessing results that do not match the corresponding expected classout of the plurality of processing results contained in each of theprocessing result group.
 8. The parameter determination assisting deviceaccording to claim 7, wherein, when the number of processing resultsthat do not match the corresponding expected class exceeds a tolerableupper limit defined in advance during generation of the processingresult group for one of the parameter candidates, the evaluation unit isconfigured to cancel generation of the processing result on theremaining image data for the parameter candidate.
 9. The parameterdetermination assisting device according to claim 1, wherein theevaluation unit is configured to calculate a statistic value on theprocessing result contained in the corresponding processing result groupfor each of the plurality of parameter candidates.
 10. The parameterdetermination assisting device according to claim 1, wherein the outputunit is configured to output the processing result contained in theprocessing result group for each of the corresponding image data. 11.The parameter determination assisting device according to claim 1,wherein the acquiring unit includes a portion configured to measure aprocessing time length required to generate the processing result; andthe output unit is configured to output the measured processing timelength together with the evaluation result.
 12. The parameterdetermination assisting device according to claim 11, wherein, when theprocessing time length exceeding a permissible time length provided inadvance is measured during the process on the plurality of image datafor one of the parameter candidates, the acquiring unit is configured tocancel acquisition of the processing result on the remaining image datafor the parameter candidate.
 13. The parameter determination assistingdevice according to claim 1, wherein the processing result containsinformation indicating a portion that matches an image pattern definedin advance in the image data, and the output unit is configured todisplay a position extracted as the portion that matches the imagepattern on a two-dimensional coordinate corresponding to the image data.14. The parameter determination assisting device according to claim 1,wherein the acquiring unit is configured to repeat the process ofacquiring the processing result on each of the plurality of image datafor each of the plurality of parameter candidates by the number of theplurality of parameter candidates.
 15. The parameter determinationassisting device according to claim 1, wherein the acquiring unit isconfigured to repeat the process of acquiring the processing result oneach of the plurality of parameter candidates for each of the pluralityof image data by the number of the plurality of image data.
 16. Theparameter determination assisting device according to claim 1, whereinthe candidate generation unit includes a portion configured to generatea first parameter candidate group including a plurality of parametercandidates, and a second parameter candidate group having a fluctuationstep smaller than a fluctuation step between the parameter candidatescontained in the first parameter candidate group, and the acquiring unitis configured to determine a parameter value to be a fluctuation targetout of the acquired processing results after acquiring the processingresult on the parameter candidate contained in the first parametercandidate group, and to acquire the processing result on the parametercandidate contained in the second parameter candidate groupcorresponding to the determined parameter value.
 17. The parameterdetermination assisting device according to claim 1, wherein the inputunit is configured to accept image data of a first group obtained byimaging a first measuring target object and an expected result of afirst group corresponding to the image data of the first group, andimage data of a second group obtained by imaging a second measuringtarget object and an expected result of a second group corresponding tothe image data of the second group, the candidate generation unit isconfigured to generate a plurality of parameter candidates of a firstgroup in which at least one parameter value contained in a set of firstparameters related to a process performed on the image data of the firstgroup is different from each other, and to generate a plurality ofparameter candidates of a second group in which at least one parametervalue contained in a set of second parameters related to a processperformed on the image data of the second group is different from eachother, the acquiring unit and the evaluation unit are configured toacquire a plurality of processing results of a first group using each ofthe plurality of parameter candidates of the first group on the imagedata of the first group, and to generate a first evaluation result onthe plurality of processing results of the first group by comparing eachof the plurality of processing results of the first group with thecorresponding expected result out of the expected results of the firstgroup; and then to acquire a plurality of processing results of a secondgroup using the plurality of parameter candidates of the second group onthe image data of the second group, and to generate a second evaluationresult on the plurality of processing results of the second group bycomparing each of the plurality of processing results of the secondgroup with the corresponding expected result out of the expected resultsof the second group, and the output unit is configured to output atleast one of the first evaluation result and the second evaluationresult after the processes by the acquiring unit and the evaluation unitare completed.
 18. A program determination assisting method forobtaining a processing result by performing a process using a set ofparameters defined in advance on image data obtained by imaging ameasuring target object, the parameter determination assisting methodcomprising: accepting, at an input unit, the image data and an expectedresult corresponding to the image data, wherein the expected resultseach includes an expected class indicating whether the correspondingmeasuring target object is a non-defective article or a defectivearticle; generating, at a candidate generation unit, a plurality ofparameter candidates in which at least one parameter value contained inthe set of parameters is different from each other, wherein at least oneof the plurality of the parameter candidates is length of processingtime; acquiring, at an acquiring unit, a plurality of processing resultsrespectively using the plurality of parameter candidates on the imagedata according to a condition; generating, at an evaluation unit, anevaluation result for each of the plurality of generated processingresults by comparing each of the plurality of generated processingresults with the expected result; and outputting, from an output unit,the evaluation result for each of the plurality of parameter candidates,wherein the input unit is configured to accept the plurality of imagedata respectively acquired from a plurality of measuring target objectsand the expected results respectively corresponding to the plurality ofimage data, and the acquiring unit is configured to acquire a processingresult group including the evaluation results on the plurality of imagedata for the plurality of parameter candidates respectively, theacquiring unit includes: a portion configured to calculate acharacteristic amount on the image data by performing the process on theimage data; and a portion configured to generate the processing resultby comparing the characteristic amount with a threshold value providedin advance, and the output unit is configured to output the condition;output the evaluation result with a mark indicating a match between theprocessing result and the expected result in a different manner from amark indicating a mismatch between the processing result and theexpected result; and output an area for displaying the mark indicatingthe match between the processing result and the expected result in adifferent manner from another area a representation of a distributionstate of the characteristic amounts corresponding to the processingresults contained in the processing result group on a display based onselection of output mode from more than one output modes by a user.